Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5711 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
RevLine 
[3341]1/*!
2  \file texture.h
3  \brief Contains the texture class, that handles the reading of Images into Texutre-files.
4
[4836]5  @todo procedural textures
[3341]6*/
7
8#ifndef _TEXTURE_H
9#define _TEXTURE_H
10
[3548]11#include "glincl.h"
[5304]12#include "base_object.h"
[3548]13
14#include "debug.h"
15
[5239]16struct SDL_Surface;
17
[4466]18//! an enumerator for different procedural texture-types
19typedef enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS,
[5239]20                            TEXTURE_NOISE };
[3341]21
22//! A Class, that reads in Textures from different fileformats.
[5308]23class Texture : public BaseObject
[3341]24{
25 public:
[3905]26  Texture(const char* imageName = NULL);
[4466]27  //  Texture(TEXTURE_TYPE type, int resolution);
28
[4746]29  ~Texture();
[3905]30
[4836]31  /** @returns The textureID of this texture.  */
[5239]32  inline GLuint getTexture() const { return this->texture; };
[3905]33  GLuint loadTexToGL (SDL_Surface* surface);
[4836]34  /** @returns true if texture has alpha, false otherwise */
[4746]35  inline bool hasAlpha() const {return bAlpha;}
[3341]36
[3655]37  bool loadImage(const char* imageName);
[4466]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.
[3863]43};
[3341]44
45#endif /* _TEXTURE_H */
Note: See TracBrowser for help on using the repository browser.