Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/importer/texture.h @ 4370

Last change on this file since 4370 was 4370, checked in by bensch, 19 years ago

orxonox/trunk: objModel's materials should now automatically load textures

File size: 1.0 KB
RevLine 
[3341]1/*!
2  \file texture.h
3  \brief Contains the texture class, that handles the reading of Images into Texutre-files.
4
5  \todo free SDL-surface when deleting Material.
6  \todo delete imgNameWithPath after use creation.
7*/
8
9#ifndef _TEXTURE_H
10#define _TEXTURE_H
11
[3548]12#include "glincl.h"
13
14#include "debug.h"
15
[4357]16enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS,
17                    TEXTURE_NOISE };
[3341]18
19//! A Class, that reads in Textures from different fileformats.
20class Texture
21{
22 private:
[3454]23  GLuint texture;   //!< The Texture-ID of opengl from this Texture.
[3655]24  char* searchTextureInPaths(const char* texName) const;
[3966]25
26  bool bAlpha;           //!< if the texture has an alpha channel.
[3341]27 public:
[3905]28  Texture(const char* imageName = NULL);
[4357]29  Texture(TEXTURE_TYPE type, int resolution);
[3344]30  ~Texture(void);
[3905]31
[3454]32  /** \returns The textureID of this texture.  */
33  inline GLuint getTexture(void) {return this->texture;} 
[3905]34  GLuint loadTexToGL (SDL_Surface* surface);
[3966]35  inline bool hasAlpha(void) {return bAlpha;}
[3341]36
[3655]37  bool loadImage(const char* imageName);
[3863]38};
[3341]39
40#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.