Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3365 in orxonox.OLD for orxonox/trunk/src/importer/material.h


Ignore:
Timestamp:
Jan 7, 2005, 1:14:33 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged branches/parenting back to the.
merged with command:
svn merge branches/parenting trunk -r 3247:HEAD
resolved all conflicts in favor of parenting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/importer/material.h

    r3196 r3365  
    1414
    1515#include "../stdincl.h"
     16#include "texture.h"
    1617
    1718#if HAVE_CONFIG_H
     
    1920#endif /* HAVE_CONFIG_H */
    2021
    21 #ifdef HAVE_SDL_SDL_IMAGE_H
    22 #include <SDL/SDL_image.h>
    23 #else
    24 // IMAGE LIBS //
    25 #ifdef HAVE_JPEGLIB_H
    26 extern "C"{         // This has to be done, because not a c++ lib
    27 #include <jpeglib.h>
    28 }
    29 #endif /* HAVE_JPEGLIB_H */
    30 #ifdef HAVE_PNG_H
    31 #include <png.h>
    32 #endif /* HAVE_PNG_H */
    33 #endif /* HAVE_SDL_SDL_IMAGE_H */
    3422
    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 PathList
    43 {
    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 };
    5323
    5424
     
    9262
    9363 private:
    94   //! Struct to handle Infos about an Image
    95   struct Image
    96   {
    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;     //!< BitsPerPixel
    101     GLuint type;    //!< Type of the Image.
    102     GLubyte *data;  //!< The Image Data comes here! DANGER: uncompressed data.
    103   };
    104 
    105 
    10664  char* name;        //!< The Name of the Material.
    10765  int illumModel;    //!< The IlluminationModel is either flat or smooth.
     
    11270  float transparency;//!< The transperency of the Material.
    11371
    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   GLuint diffuseTexture; //!< The diffuse texture of the Material.
    117   GLuint ambientTexture; //!< The ambient texture of the Material.
    118   GLuint specularTexture;//!< The specular texture of the Material.
     72  Texture* diffuseTexture; //!< The diffuse texture of the Material.
     73  Texture* ambientTexture; //!< The ambient texture of the Material.
     74  Texture* specularTexture;//!< The specular texture of the Material.
    11975 
    12076  bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.
     
    12480  Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists.
    12581
    126   // TEXTURING
    127   bool loadTexToGL (Image* pImage, GLuint* texture);
    12882
    129   bool loadImage(char* imageName, GLuint* texture);
    130 #ifndef HAVE_SDL_SDL_IMAGE_H
    131 
    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 #endif
    14483};
    14584#endif
Note: See TracChangeset for help on using the changeset viewer.