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_obj.cc

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