Changeset 7229 in orxonox.OLD for branches/resources/src/lib/graphics/importer
- Timestamp:
- Mar 21, 2006, 3:13:34 PM (19 years ago)
- Location:
- branches/resources/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/resources/src/lib/graphics/importer/material.cc
r7221 r7229 83 83 ResourceManager::getInstance()->unload(this->diffuseTexture); 84 84 if (m.diffuseTexture != NULL) 85 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture);85 this->diffuseTexture = dynamic_cast<Texture*>(ResourceManager::getInstance()->copy(m.diffuseTexture)); 86 86 this->ambientTexture = NULL; /// FIXME 87 87 this->specularTexture = NULL; /// FIXME … … 298 298 //! @todo Textures from .mtl-file need special care. 299 299 if (!dMap.empty()) 300 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target);300 this->diffuseTexture = dynamic_cast<Texture*>(ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target)); 301 301 else 302 302 this->diffuseTexture = NULL; -
branches/resources/src/lib/graphics/importer/texture.h
r7221 r7229 8 8 9 9 #include "base_object.h" 10 #include "lib/util/loading/resource.h" 10 11 11 12 #include "glincl.h" … … 15 16 16 17 //! A Class, that reads in Textures from different fileformats. 17 class Texture : public BaseObject18 class Texture : public Loading::Resource 18 19 { 19 20 public: … … 43 44 44 45 protected: 45 46 46 bool setSurface(SDL_Surface* newSurface); 47 47 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; };
Note: See TracChangeset
for help on using the changeset viewer.