- Timestamp:
- Jan 22, 2006, 2:22:48 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r6645 r6651 81 81 ResourceManager::getInstance()->unload(this->diffuseTexture); 82 82 if (m.diffuseTexture != NULL) 83 this->diffuseTexture = m.diffuseTexture; /// HACK shoudl be:(Texture*)ResourceManager::getInstance()->load();83 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture); 84 84 this->ambientTexture = NULL; /// FIXME 85 85 this->specularTexture = NULL; /// FIXME -
trunk/src/lib/particles/sprite_particles.cc
r6628 r6651 125 125 GLboolean checkLight = false; 126 126 glGetBooleanv(GL_LIGHTING, &checkLight); 127 if (checkLight == GL_TRUE)128 glDisable(GL_LIGHTING);127 // if (checkLight == GL_TRUE) 128 // glDisable(GL_LIGHTING); 129 129 glMatrixMode(GL_MODELVIEW); 130 130 glDepthMask(GL_FALSE); -
trunk/src/util/loading/resource_manager.cc
r6650 r6651 325 325 else 326 326 return false; 327 } 328 329 /** 330 * tells the ResourceManager to generate a Copy of the Resource. 331 * @brief resourcePointer: The Pointer to the resource to copy 332 * @returns the Resource pointed to resourcePointer. 333 */ 334 BaseObject* ResourceManager::copy(BaseObject* resourcePointer) 335 { 336 Resource* tmp = locateResourceByPointer(resourcePointer); 337 if (tmp!=NULL) 338 { 339 tmp->count++; 340 return tmp->pointer; 341 } 342 else 343 return NULL; 327 344 } 328 345 … … 543 560 * @returns true if successful (pointer found, and deleted), false otherwise 544 561 */ 545 bool ResourceManager::unload( void* pointer, ResourcePriority prio)562 bool ResourceManager::unload(BaseObject* pointer, ResourcePriority prio) 546 563 { 547 564 if (pointer == NULL) -
trunk/src/util/loading/resource_manager.h
r6650 r6651 107 107 bool cache(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO, 108 108 const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType()); 109 BaseObject* copy(BaseObject* resourcePointer); 109 110 110 111 BaseObject* load(const char* fileName, ResourcePriority prio = RP_NO, … … 112 113 BaseObject* load(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO, 113 114 const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType()); 114 bool unload( void* pointer, ResourcePriority prio = RP_NO);115 bool unload(BaseObject* pointer, ResourcePriority prio = RP_NO); 115 116 bool unload(Resource* resource, ResourcePriority = RP_NO); 116 117 bool unloadAllByPriority(ResourcePriority prio);
Note: See TracChangeset
for help on using the changeset viewer.