Changeset 3340 in orxonox.OLD for orxonox/branches/parenting/src/importer/material.h
- Timestamp:
- Jan 5, 2005, 3:01:49 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/importer/material.h
r3196 r3340 14 14 15 15 #include "../stdincl.h" 16 #include "texture.h" 16 17 17 18 #if HAVE_CONFIG_H … … 19 20 #endif /* HAVE_CONFIG_H */ 20 21 21 #ifdef HAVE_SDL_SDL_IMAGE_H22 #include <SDL/SDL_image.h>23 #else24 // IMAGE LIBS //25 #ifdef HAVE_JPEGLIB_H26 extern "C"{ // This has to be done, because not a c++ lib27 #include <jpeglib.h>28 }29 #endif /* HAVE_JPEGLIB_H */30 #ifdef HAVE_PNG_H31 #include <png.h>32 #endif /* HAVE_PNG_H */33 #endif /* HAVE_SDL_SDL_IMAGE_H */34 22 35 //! Class to handle lists of paths.36 /**37 \todo Ability to return Paths by itself.38 39 It is simple to use, and good, for all PathList you want.40 just create a new Pathlist, and add Paths.41 */42 class PathList43 {44 public:45 PathList();46 PathList(char* pName);47 48 ~PathList();49 void addPath (char* pName);50 char* pathName; //!< The Name of the current Path.51 PathList* next; //!< Pointer to the next Pathlist.52 };53 23 54 24 … … 92 62 93 63 private: 94 //! Struct to handle Infos about an Image95 struct Image96 {97 int rowSpan; //!< The count of the rows this Image has.98 GLuint width; //!< The width of the Image.99 GLuint height; //!< The height of the Image.100 GLuint bpp; //!< BitsPerPixel101 GLuint type; //!< Type of the Image.102 GLubyte *data; //!< The Image Data comes here! DANGER: uncompressed data.103 };104 105 106 64 char* name; //!< The Name of the Material. 107 65 int illumModel; //!< The IlluminationModel is either flat or smooth. … … 112 70 float transparency;//!< The transperency of the Material. 113 71 114 static PathList* pathList; //!< A pointer to the first element of Pathlist. This is static, because pathlists are global \todo copy this to the Globals.h or DataTank for deletion at the end.115 116 72 GLuint diffuseTexture; //!< The diffuse texture of the Material. 117 73 GLuint ambientTexture; //!< The ambient texture of the Material. … … 124 80 Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists. 125 81 126 // TEXTURING127 bool loadTexToGL (Image* pImage, GLuint* texture);128 82 129 bool loadImage(char* imageName, GLuint* texture);130 #ifndef HAVE_SDL_SDL_IMAGE_H131 132 bool loadBMP (char* bmpName, GLuint* texture);133 134 bool loadJPG (char* jpgName, GLuint* texture);135 136 /// TGA ///137 138 bool loadTGA(const char * tgaName, GLuint* texture);139 bool loadUncompressedTGA(const char * filename, FILE * fTGA, GLuint* texture);140 bool loadCompressedTGA(const char * filename, FILE * fTGA, GLuint* texture);141 142 bool loadPNG(const char* pngName, GLuint* texture);143 #endif144 83 }; 145 84 #endif
Note: See TracChangeset
for help on using the changeset viewer.