Changeset 3701 in orxonox.OLD for orxonox/branches/textEngine/src/lib/graphics/importer
- Timestamp:
- Mar 31, 2005, 10:27:46 PM (20 years ago)
- Location:
- orxonox/branches/textEngine/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/textEngine/src/lib/graphics/importer/texture.cc
r3681 r3701 98 98 } 99 99 100 #ifdef HAVE_SDL_ SDL_IMAGE_H100 #ifdef HAVE_SDL_IMAGE_H 101 101 bool Texture::loadImage(const char* imageName) 102 102 { … … 118 118 pImage->format = GL_RGB; 119 119 else if (pImage->bpp == 4) 120 pImage->format = GL_RGBA; 121 120 { 121 pImage->format = GL_RGBA; 122 SDL_SetAlpha(this->map, 0, 0); 123 } 124 122 125 if( !IMG_isPNG(SDL_RWFromFile(imageName, "rb")) && !IMG_isJPG(SDL_RWFromFile(imageName, "rb"))) 123 126 for (int i=0;i<map->h * map->w *3;i+=3) … … 146 149 147 150 148 #else /* HAVE_SDL_ SDL_IMAGE_H */151 #else /* HAVE_SDL_IMAGE_H */ 149 152 /** 150 153 \brief Makes the Programm ready to Read-in a texture-File … … 832 835 833 836 } 834 #endif /* HAVE_SDL_ SDL_IMAGE_H */837 #endif /* HAVE_SDL_IMAGE_H */ -
orxonox/branches/textEngine/src/lib/graphics/importer/texture.h
r3681 r3701 14 14 #include "debug.h" 15 15 16 #ifdef HAVE_SDL_ SDL_IMAGE_H17 #include <SDL /SDL_image.h>16 #ifdef HAVE_SDL_IMAGE_H 17 #include <SDL_image.h> 18 18 #else 19 19 // IMAGE LIBS // … … 26 26 #include <png.h> 27 27 #endif /* HAVE_PNG_H */ 28 #endif /* HAVE_SDL_ SDL_IMAGE_H */28 #endif /* HAVE_SDL_IMAGE_H */ 29 29 30 30 //! A Class, that reads in Textures from different fileformats. … … 57 57 58 58 bool loadImage(const char* imageName); 59 #ifndef HAVE_SDL_ SDL_IMAGE_H59 #ifndef HAVE_SDL_IMAGE_H 60 60 61 61 bool loadBMP (char* bmpName); … … 74 74 75 75 }; 76 77 78 79 76 #endif /* _TEXTURE_H */
Note: See TracChangeset
for help on using the changeset viewer.