Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2006, 10:17:56 AM (18 years ago)
Author:
bensch
Message:

more nice comments, and also updated the KeepLevel loading (if you want to load a Resource to a KeepLevel just append it at loadtime:
eg.:
Texture tex = ResourceTexture(orxonox.png, GL_TEXTURE_2D, GameEnd);
where GameEnd is the KeepLevel as defined in orxonox.cc→initResources()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/graphics/importer/resource_texture.cc

    r9847 r9854  
    66
    77
    8 ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target)
     8ResourceTexture::ResourceTexture(const std::string& imageName, GLenum target, const Resources::KeepLevel& keepLevel)
    99    : Resource(&ResourceTexture::type)
    1010{
     
    2121    std::string fileName = this->Resource::locateFile(imageName);
    2222    this->Texture::loadImage(fileName, target);
    23     this->Resource::addResource(new ResourceTexture::TextureResourcePointer(imageName + ',' + MultiType((int)target).getString(), Resources::KeepLevel(0), this->Texture::dataPointer()));
     23    this->Resource::addResource(new ResourceTexture::TextureResourcePointer(imageName + ',' + MultiType((int)target).getString(), keepLevel, this->Texture::dataPointer()));
    2424  }
    2525}
    2626
    27 ResourceTexture ResourceTexture::createFromString(const std::string& loadString)
     27ResourceTexture ResourceTexture::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
    2828{
    2929  SubString loadValues(loadString, ',');
     
    3535    target = (GLenum)MultiType(loadValues[2]).getInt();
    3636
    37   return ResourceTexture(imageName, target);
     37  return ResourceTexture(imageName, target, keepLevel);
    3838}
    3939
Note: See TracChangeset for help on using the changeset viewer.