Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3110 in orxonox.OLD for orxonox/branches/images/importer


Ignore:
Timestamp:
Dec 6, 2004, 1:11:56 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/images: test for jpeg and png libs in configure.ac and material.cc/h

Location:
orxonox/branches/images/importer
Files:
2 edited

Legend:

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

    r3108 r3110  
    564564bool Material::loadJPG (char* jpgName, GLuint* texture)
    565565{
     566#ifdef HAVE_JPEGLIB_H
    566567  struct jpeg_decompress_struct cinfo;
    567568  Image *pImage = NULL;
     
    649650    }
    650651  return true;
     652#else /* HAVE_JPEGLIB_H */
     653  if (verbose >=1)
     654    printf ("sorry, but you did not compile with jpeg-support.\nEither install SDL_image or jpeglib, and recompile to see the image\n");
     655  return false;
     656#endif /* HAVE_JPEGLIB_H */
     657
    651658}
    652659
     
    980987bool Material::loadPNG(const char* pngName, GLuint* texture)
    981988{
     989#ifdef HAVE_PNG_H
    982990  Image* pImage = new Image;
    983991
     
    10991107 
    11001108  return true;
     1109#else /* HAVE_PNG_H */
     1110  if (verbose >=1)
     1111    printf ("sorry, but you did not compile with png-support.\nEither install SDL_image or libpng, and recompile to see the image\n");
     1112  return false;
     1113#endif /* HAVE_PNG_H */
     1114
    11011115}
    11021116
  • orxonox/branches/images/importer/material.h

    r3104 r3110  
    1717#if HAVE_CONFIG_H
    1818#include <config.h>
    19 #endif
     19#endif /* HAVE_CONFIG_H */
    2020
    2121#ifdef HAVE_SDL_SDL_IMAGE_H
     
    2323#else
    2424// IMAGE LIBS //
     25#ifdef HAVE_JPEGLIB_H
    2526extern "C"{         // This has to be done, because not a c++ lib
    2627#include <jpeglib.h>
    2728}
     29#endif /* HAVE_JPEGLIB_H */
     30#ifdef HAVE_PNG_H
    2831#include <png.h>
    29 #endif
     32#endif /* HAVE_PNG_H */
     33#endif /* HAVE_SDL_SDL_IMAGE_H */
    3034
    3135//! Class to handle Materials.
Note: See TracChangeset for help on using the changeset viewer.