Changeset 3103 in orxonox.OLD for orxonox/branches/images/importer
- Timestamp:
- Dec 5, 2004, 5:01:10 PM (20 years ago)
- Location:
- orxonox/branches/images/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/importer/material.cc
r3098 r3103 376 376 377 377 378 378 #ifdef HAVE_SDL_SDL_IMAGE_H 379 bool Material::loadImage(char* imageName, GLuint* texture) 380 { 381 SDL_Surface* map; 382 Image* pImage = new Image; 383 map=IMG_Load(imageName); 384 if(!map) 385 { 386 printf("IMG_Load: %s\n", IMG_GetError()); 387 } 388 pImage->height = map->h; 389 pImage->width = map->w; 390 pImage->data = (GLubyte*)map->pixels; 391 392 loadTexToGL (pImage, texture); 393 394 } 395 #else 379 396 /** 380 397 \brief Makes the Programm ready to Read-in a texture-File … … 1075 1092 return true; 1076 1093 } 1094 1095 #endif /* HAVE_SDL_SDL_IMAGE_H */ -
orxonox/branches/images/importer/material.h
r3098 r3103 14 14 #include <stdlib.h> 15 15 #include <fstream> 16 17 #if HAVE_CONFIG_H 18 #include <config.h> 19 #endif 20 21 #ifdef HAVE_SDL_SDL_IMAGE_H 22 #include <SDL/SDL_image.h> 23 #endif 16 24 17 25 // IMAGE LIBS // … … 92 100 93 101 bool loadImage(char* imageName, GLuint* texture); 102 #ifndef HAVE_SDL_SDL_IMAGE_H 94 103 95 104 bool loadBMP (char* bmpName, GLuint* texture); … … 104 113 105 114 bool loadPNG(const char* pngName, GLuint* texture); 115 #endif 106 116 }; 107 117 #endif
Note: See TracChangeset
for help on using the changeset viewer.