Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4448 was 4381, checked in by bensch, 20 years ago

orxonox/trunk: made include more local. stdincl.h not in base_object.h anymore

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 free SDL-surface when deleting Material.
6  \todo delete imgNameWithPath after use creation.
7*/
8
9#ifndef _TEXTURE_H
10#define _TEXTURE_H
11
12#include "sdlincl.h"
13#include "glincl.h"
14
15#include "debug.h"
16
17enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS,
18                    TEXTURE_NOISE };
19
20//! A Class, that reads in Textures from different fileformats.
21class Texture
22{
23 private:
24  GLuint texture;   //!< The Texture-ID of opengl from this Texture.
25  char* searchTextureInPaths(const char* texName) const;
26
27  bool bAlpha;           //!< if the texture has an alpha channel.
28 public:
29  Texture(const char* imageName = NULL);
30  Texture(TEXTURE_TYPE type, int resolution);
31  ~Texture(void);
32
33  /** \returns The textureID of this texture.  */
34  inline GLuint getTexture(void) {return this->texture;} 
35  GLuint loadTexToGL (SDL_Surface* surface);
36  inline bool hasAlpha(void) {return bAlpha;}
37
38  bool loadImage(const char* imageName);
39};
40
41#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.