Changeset 8363 in orxonox.OLD for trunk/src/lib/graphics/importer/texture.h
- Timestamp:
- Jun 14, 2006, 10:37:08 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/texture.h
r8312 r8363 11 11 #include "glincl.h" 12 12 #include "count_pointer.h" 13 #include "texture_data.h" 14 13 15 14 16 /* Forward Declaration */ 15 17 struct SDL_Surface; 16 17 18 class TextureData19 {20 public:21 TextureData();22 ~TextureData();23 24 inline GLuint getTexture() const { return this->texture; };25 /** @returns true if texture has alpha, false otherwise */26 inline bool hasAlpha() const {return this->bAlpha; }27 /** @returns the stored image of this Texture */28 const SDL_Surface* const getStoredImage() const { return this->image; };29 30 bool loadSurface(SDL_Surface* surface, GLenum target = GL_TEXTURE_2D);31 32 bool rebuild();33 34 bool setSurface(SDL_Surface* newSurface);35 /** @returns true if the Surface has an Alpha Value. */36 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; return this->bAlpha; };37 bool setTexture(GLuint texture);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 SDL_Surface* image; //!< The SDL_Surfce that stores the Texture on it.43 };44 45 18 46 19 //! A Class, that reads in Textures from different fileformats.
Note: See TracChangeset
for help on using the changeset viewer.