Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: compile-performance-stuff

File size: 1.1 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 "glincl.h"
12
13#include "debug.h"
14
15struct SDL_Surface;
16
17//! an enumerator for different procedural texture-types
18typedef enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS,
19                            TEXTURE_NOISE };
20
21//! A Class, that reads in Textures from different fileformats.
22class Texture
23{
24 public:
25  Texture(const char* imageName = NULL);
26  //  Texture(TEXTURE_TYPE type, int resolution);
27
28  ~Texture();
29
30  /** @returns The textureID of this texture.  */
31  inline GLuint getTexture() const { return this->texture; };
32  GLuint loadTexToGL (SDL_Surface* surface);
33  /** @returns true if texture has alpha, false otherwise */
34  inline bool hasAlpha() const {return bAlpha;}
35
36  bool loadImage(const char* imageName);
37
38
39 private:
40  GLuint     texture;          //!< The Texture-ID of opengl from this Texture.
41  bool       bAlpha;           //!< if the texture has an alpha channel.
42};
43
44#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.