- Timestamp:
- Dec 5, 2004, 6:52:02 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/importer/material.cc
r3103 r3107 14 14 15 15 TGA-code: borrowed from nehe-Tutorials 16 17 ToDo: free SDL-surface when deleting Material. 16 18 */ 17 19 … … 390 392 pImage->data = (GLubyte*)map->pixels; 391 393 394 SDL_RWops *imgType; 395 imgType=SDL_RWFromFile(imageName, "rb"); 396 if( !IMG_isPNG(SDL_RWFromFile(imageName, "rb")) && !IMG_isJPG(SDL_RWFromFile(imageName, "rb"))) 397 for (int i=0;i<map->h * map->w *3;i+=3) 398 { 399 GLuint temp = pImage->data[i]; 400 pImage->data[i] = pImage->data[i+2]; 401 pImage->data[i+2] = temp; 402 } 392 403 loadTexToGL (pImage, texture); 393 404 394 405 } 395 406 #else
Note: See TracChangeset
for help on using the changeset viewer.