Changeset 9823 in orxonox.OLD for branches/new_class_id/src/lib/graphics/importer
- Timestamp:
- Sep 25, 2006, 11:28:28 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/graphics/importer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/importer/material.cc
r9785 r9823 99 99 100 100 const Material* Material::selectedMaterial = NULL; 101 102 103 /// TODO FIX THIS104 // Material& Material::operator=(const Material& m)105 // {106 // this->setIllum(m.illumModel);107 // this->setDiffuse(m.diffuse[0],m.diffuse[1],m.diffuse[2]);108 // this->setAmbient(m.ambient[0],m.ambient[1],m.ambient[2]);109 // this->setSpecular(m.specular[0],m.specular[1],m.specular[2]);110 // this->setShininess(m.shininess);111 // this->setTransparency(m.transparency);112 //113 // if (this->diffuseTexture != NULL)114 // ResourceManager::getInstance()->unload(this->diffuseTexture);115 // if (m.diffuseTexture != NULL)116 // this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture);117 // this->ambientTexture = NULL; /// FIXME118 // this->specularTexture = NULL; /// FIXME119 //120 // this->setName(m.getName());121 // }122 123 124 101 125 102 /** … … 296 273 //ResourceManager::getInstance()->addImageDir(pathName); 297 274 } 298 299 // MAPPING //300 301 275 302 276 /** -
branches/new_class_id/src/lib/graphics/importer/material.h
r9718 r9823 29 29 virtual ~Material (); 30 30 31 Material& operator=(const Material& material); 32 31 33 void loadParams(const TiXmlElement* root); 32 33 Material& operator=(const Material& material);34 34 35 35 bool select () const; -
branches/new_class_id/src/lib/graphics/importer/resource_texture.cc
r9793 r9823 1 1 2 2 #include "resource_texture.h" 3 #include "substring.h" 4 #include "multi_type.h" 3 5 #include "debug.h" 4 6 … … 23 25 } 24 26 27 ResourceTexture ResourceTexture::createFromString(const std::string& loadString) 28 { 29 SubString loadValues(loadString, ','); 30 std::string imageName; 31 GLenum target = GL_TEXTURE_2D; 32 if (loadValues.size() > 0) 33 imageName = loadValues[0]; 34 if (loadValues.size() > 1) 35 target = (GLenum)MultiType(loadValues[2]).getInt(); 25 36 26 Resources::Type ResourceTexture::type("Texture"); 37 return ResourceTexture(imageName, target); 38 } 39 40 41 42 Resources::tType<ResourceTexture> ResourceTexture::type("Texture"); 27 43 28 44 -
branches/new_class_id/src/lib/graphics/importer/resource_texture.h
r9800 r9823 16 16 public: 17 17 ResourceTexture(const std::string& imageName, GLenum target = GL_TEXTURE_2D); 18 18 static ResourceTexture createFromString(const std::string& loadString); 19 19 20 20 private: … … 24 24 TextureResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const TextureData::Pointer& data); 25 25 inline const TextureData::Pointer& ptr() const { return pointer; } 26 26 private: 27 27 TextureData::Pointer pointer; 28 28 }; 29 29 30 30 private: 31 static Resources:: Typetype;31 static Resources::tType<ResourceTexture> type; 32 32 }; 33 33
Note: See TracChangeset
for help on using the changeset viewer.