Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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

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