Last change
on this file since 5859 was
5859,
checked in by bensch, 18 years ago
|
orxonox/trunk: small changes in the Texture interface
|
File size:
1.1 KB
|
Rev | Line | |
---|
[3341] | 1 | /*! |
---|
[5768] | 2 | * @file texture.h |
---|
| 3 | * @brief Contains the texture class, that handles the reading of Images into Texutre-files. |
---|
| 4 | */ |
---|
[3341] | 5 | |
---|
[5858] | 6 | #ifndef _MULTI_FRAME_TEXTURE_H |
---|
| 7 | #define _MULTI_FRAME_TEXTURE_H |
---|
[3341] | 8 | |
---|
[5858] | 9 | #include "texture.h" |
---|
[3548] | 10 | |
---|
[5768] | 11 | #include "glincl.h" |
---|
[5858] | 12 | #include <vector> |
---|
[3548] | 13 | |
---|
[5768] | 14 | /* Forward Declaration */ |
---|
[5239] | 15 | struct SDL_Surface; |
---|
| 16 | |
---|
[3341] | 17 | //! A Class, that reads in Textures from different fileformats. |
---|
[5858] | 18 | class MultiFrameTexture : public Texture |
---|
[5768] | 19 | { |
---|
| 20 | public: |
---|
[5858] | 21 | MultiFrameTexture(unsigned int count, ...); |
---|
[4466] | 22 | // Texture(TEXTURE_TYPE type, int resolution); |
---|
[5858] | 23 | ~MultiFrameTexture(); |
---|
[3905] | 24 | |
---|
[5858] | 25 | bool loadImages(unsigned int cound, ...); |
---|
[5768] | 26 | bool rebuild(); |
---|
[5753] | 27 | |
---|
[5768] | 28 | /** @returns The textureID of this texture. */ |
---|
[5859] | 29 | inline GLuint getFrameTexture(unsigned int frameNumber) const { return this->textures[frameNumber]; }; |
---|
[3341] | 30 | |
---|
[5859] | 31 | const SDL_Surface* const getFrameImage(unsigned int frameNumber) const { return this->images[frameNumber]; }; |
---|
[5856] | 32 | |
---|
[5768] | 33 | private: |
---|
[5858] | 34 | std::vector<GLuint> textures; //!< The Texture-ID of opengl from this Texture. |
---|
| 35 | std::vector<SDL_Surface*> images; //!< The SDL_Surfce that stores the Texture on it. |
---|
[5768] | 36 | }; |
---|
| 37 | |
---|
[5858] | 38 | #endif /* _MULTI_FRAME_TEXTURE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.