Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/graphics/importer/texture.h @ 5526

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

orxonox/trunk: Fixed a reversive BUG in the ResourceManager:
Since resources, that depend on each other are loaded left tgo right they must be unlinked right to left… this cost me 3 hours.
What a luck i found this :)

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