Changeset 5755 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Nov 24, 2005, 1:49:15 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r5656 r5755 30 30 #include "text.h" 31 31 32 33 #ifdef __WIN32__ 34 #include "class_list.h" 35 #include "texture.h" 36 #include "list.h" 37 #endif 32 38 using namespace std; 33 39 … … 203 209 204 210 SDL_WM_SetCaption (windowName, icon); 205 206 211 } 207 212 … … 302 307 glLoadIdentity(); 303 308 glViewport(0, 0, width, height); // Reset The Current Viewport 309 310 // REBUILDING TEXTURES (ON WINDOWS CONTEXT SWITCH) 311 #ifdef __WIN32__ 312 tList<BaseObject>* texList = ClassList::getList(CL_TEXTURE); 313 if (texList != NULL) 314 { 315 tIterator<BaseObject>* texIt = texList->getIterator(); 316 Texture* reTex = static_cast<Texture*>(texIt->firstElement()); 317 while (reTex != NULL) 318 { 319 reTex->rebuild(); 320 321 reTex = static_cast<Texture*>(texIt->nextElement()); 322 } 323 } 324 #endif /* __WIN32__ */ 304 325 } 305 326 -
trunk/src/lib/graphics/importer/texture.cc
r5754 r5755 106 106 } 107 107 108 bool Texture::re load()108 bool Texture::rebuild() 109 109 { 110 110 if (this->texture != 0) … … 115 115 116 116 if (this->image != NULL) 117 this->texture = this->loadTexToGL(this->image); 117 { 118 PRINTF(4)("Reloading Texture %s\n", this->getName()); 119 this->texture = this->loadTexToGL(this->image); 120 } 118 121 119 122 } -
trunk/src/lib/graphics/importer/texture.h
r5753 r5755 29 29 30 30 bool loadImage(const char* imageName); 31 bool re load();31 bool rebuild(); 32 32 33 33 /** @returns The textureID of this texture. */
Note: See TracChangeset
for help on using the changeset viewer.