Last change
on this file since 4061 was
3966,
checked in by bensch, 20 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
|
Line | |
---|
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 | |
---|
12 | #include "glincl.h" |
---|
13 | |
---|
14 | #include "debug.h" |
---|
15 | |
---|
16 | #include <SDL_image.h> |
---|
17 | |
---|
18 | //! A Class, that reads in Textures from different fileformats. |
---|
19 | class Texture |
---|
20 | { |
---|
21 | private: |
---|
22 | GLuint texture; //!< The Texture-ID of opengl from this Texture. |
---|
23 | char* searchTextureInPaths(const char* texName) const; |
---|
24 | void swap(unsigned char &a, unsigned char &b); |
---|
25 | |
---|
26 | bool bAlpha; //!< if the texture has an alpha channel. |
---|
27 | public: |
---|
28 | Texture(const char* imageName = NULL); |
---|
29 | ~Texture(void); |
---|
30 | |
---|
31 | /** \returns The textureID of this texture. */ |
---|
32 | inline GLuint getTexture(void) {return this->texture;} |
---|
33 | GLuint loadTexToGL (SDL_Surface* surface); |
---|
34 | inline bool hasAlpha(void) {return bAlpha;} |
---|
35 | |
---|
36 | bool loadImage(const char* imageName); |
---|
37 | }; |
---|
38 | |
---|
39 | #endif /* _TEXTURE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.