Changeset 4466 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer/texture.h
- Timestamp:
- Jun 2, 2005, 1:37:53 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/texture.h
r4381 r4466 3 3 \brief Contains the texture class, that handles the reading of Images into Texutre-files. 4 4 5 \todo free SDL-surface when deleting Material. 6 \todo delete imgNameWithPath after use creation. 5 \todo procedural textures 7 6 */ 8 7 … … 15 14 #include "debug.h" 16 15 17 enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS, 18 TEXTURE_NOISE }; 16 //! an enumerator for different procedural texture-types 17 typedef enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS, 18 TEXTURE_NOISE }; 19 19 20 20 //! A Class, that reads in Textures from different fileformats. 21 21 class Texture 22 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 23 public: 29 24 Texture(const char* imageName = NULL); 30 Texture(TEXTURE_TYPE type, int resolution); 25 // Texture(TEXTURE_TYPE type, int resolution); 26 31 27 ~Texture(void); 32 28 … … 34 30 inline GLuint getTexture(void) {return this->texture;} 35 31 GLuint loadTexToGL (SDL_Surface* surface); 36 inline bool hasAlpha(void) {return bAlpha;} 32 /** \returns true if texture has alpha, false otherwise */ 33 inline bool hasAlpha(void) const {return bAlpha;} 37 34 38 35 bool loadImage(const char* imageName); 36 37 38 private: 39 GLuint texture; //!< The Texture-ID of opengl from this Texture. 40 bool bAlpha; //!< if the texture has an alpha channel. 39 41 }; 40 42
Note: See TracChangeset
for help on using the changeset viewer.