Last change
on this file since 4079 was
3966,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged branches/particleEngine into the trunk, because of the new vector class
merged with command:
svn merge -r 3922:HEAD particleEngine/ ../trunk/
not merged src/story_entities/world.cc. will do this at a later time (do not forget)
|
File size:
994 bytes
|
Rev | Line | |
---|
[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 | |
---|
[3548] | 12 | #include "glincl.h" |
---|
| 13 | |
---|
| 14 | #include "debug.h" |
---|
| 15 | |
---|
[3790] | 16 | #include <SDL_image.h> |
---|
[3341] | 17 | |
---|
| 18 | //! A Class, that reads in Textures from different fileformats. |
---|
| 19 | class Texture |
---|
| 20 | { |
---|
| 21 | private: |
---|
[3454] | 22 | GLuint texture; //!< The Texture-ID of opengl from this Texture. |
---|
[3655] | 23 | char* searchTextureInPaths(const char* texName) const; |
---|
[3863] | 24 | void swap(unsigned char &a, unsigned char &b); |
---|
[3966] | 25 | |
---|
| 26 | bool bAlpha; //!< if the texture has an alpha channel. |
---|
[3341] | 27 | public: |
---|
[3905] | 28 | Texture(const char* imageName = NULL); |
---|
[3344] | 29 | ~Texture(void); |
---|
[3905] | 30 | |
---|
[3454] | 31 | /** \returns The textureID of this texture. */ |
---|
| 32 | inline GLuint getTexture(void) {return this->texture;} |
---|
[3905] | 33 | GLuint loadTexToGL (SDL_Surface* surface); |
---|
[3966] | 34 | inline bool hasAlpha(void) {return bAlpha;} |
---|
[3341] | 35 | |
---|
[3655] | 36 | bool loadImage(const char* imageName); |
---|
[3863] | 37 | }; |
---|
[3341] | 38 | |
---|
| 39 | #endif /* _TEXTURE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.