Changeset 4357 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer/texture.cc
- Timestamp:
- May 28, 2005, 12:05:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/texture.cc
r3966 r4357 18 18 #include "texture.h" 19 19 20 #include "debug.h" 20 21 #include "graphics_engine.h" 22 23 #include <SDL_image.h> 21 24 22 25 /** … … 167 170 168 171 GLubyte* pixels = (GLubyte*)tmpSurf->pixels; 169 170 /* this swaps the Mapping so lowel left will be upper left */171 for( int i = 0 ; i < (tmpSurf->h / 2) ; ++i )172 for( int j = 0 ; j < tmpSurf->w * tmpSurf->format->BytesPerPixel; j += tmpSurf->format->BytesPerPixel )173 for(int k = 0; k < tmpSurf->format->BytesPerPixel; ++k)174 swap( pixels[(i * tmpSurf->w * tmpSurf->format->BytesPerPixel) + j + k],175 pixels[ ( (tmpSurf->h - i - 1) * tmpSurf->w * tmpSurf->format->BytesPerPixel) + j + k]);176 172 177 173 PRINTF(3)("loading Image %s\n", imageName);
Note: See TracChangeset
for help on using the changeset viewer.