Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: changed (void) → ()

File size: 1.0 KB
Line 
1/*!
2  \file texture.h
3  \brief Contains the texture class, that handles the reading of Images into Texutre-files.
4
5  \todo procedural textures
6*/
7
8#ifndef _TEXTURE_H
9#define _TEXTURE_H
10
11#include "sdlincl.h"
12#include "glincl.h"
13
14#include "debug.h"
15
16//! an enumerator for different procedural texture-types
17typedef enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS,
18                            TEXTURE_NOISE };
19
20//! A Class, that reads in Textures from different fileformats.
21class Texture
22{
23 public:
24  Texture(const char* imageName = NULL);
25  //  Texture(TEXTURE_TYPE type, int resolution);
26
27  ~Texture();
28
29  /** \returns The textureID of this texture.  */
30  inline GLuint getTexture() {return this->texture;} 
31  GLuint loadTexToGL (SDL_Surface* surface);
32  /** \returns true if texture has alpha, false otherwise */
33  inline bool hasAlpha() const {return bAlpha;}
34
35  bool loadImage(const char* imageName);
36
37
38 private:
39  GLuint     texture;          //!< The Texture-ID of opengl from this Texture.
40  bool       bAlpha;           //!< if the texture has an alpha channel.
41};
42
43#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.