Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3103 in orxonox.OLD for orxonox/branches/images/importer/material.cc


Ignore:
Timestamp:
Dec 5, 2004, 5:01:10 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/images: testing SDL_image. It rocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/importer/material.cc

    r3098 r3103  
    376376
    377377
    378 
     378#ifdef HAVE_SDL_SDL_IMAGE_H
     379bool 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
    379396/**
    380397   \brief Makes the Programm ready to Read-in a texture-File
     
    10751092  return true;
    10761093}
     1094
     1095#endif /* HAVE_SDL_SDL_IMAGE_H */
Note: See TracChangeset for help on using the changeset viewer.