Last change
on this file since 5860 was
5860,
checked in by bensch, 19 years ago
|
orxonox/trunk: some initial work at MultiFrameTexture.cc
|
File size:
1.5 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file texture.h |
---|
3 | * @brief Contains the texture class, that handles the reading of Images into Texutre-files. |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _MULTI_FRAME_TEXTURE_H |
---|
7 | #define _MULTI_FRAME_TEXTURE_H |
---|
8 | |
---|
9 | #include "texture.h" |
---|
10 | |
---|
11 | #include "glincl.h" |
---|
12 | |
---|
13 | #include <vector> |
---|
14 | #include <stdarg.h> |
---|
15 | |
---|
16 | /* Forward Declaration */ |
---|
17 | struct SDL_Surface; |
---|
18 | |
---|
19 | //! A Class, that reads in Textures from different fileformats. |
---|
20 | class MultiFrameTexture : public Texture |
---|
21 | { |
---|
22 | public: |
---|
23 | MultiFrameTexture(unsigned int count = 0, ...); |
---|
24 | // Texture(TEXTURE_TYPE type, int resolution); |
---|
25 | ~MultiFrameTexture(); |
---|
26 | |
---|
27 | bool loadImageSeries(unsigned int count, ...); |
---|
28 | bool loadImageSeries(unsigned int count, va_list textureNames); |
---|
29 | bool addFrame(const char* image); |
---|
30 | bool addFrame(SDL_Surface* surface); |
---|
31 | |
---|
32 | virtual bool rebuild(); |
---|
33 | |
---|
34 | /** @returns The textureID of the Frame @param frameNumber the n-th frame this texture-series. */ |
---|
35 | inline GLuint getFrameTexture(unsigned int frameNumber) const { return this->textures[frameNumber]; }; |
---|
36 | /** @returns The SDL_Surface of the image at Frame @param frameNumber the n-th frame of this image-seriers */ |
---|
37 | const SDL_Surface* const getFrameImage(unsigned int frameNumber) const { return this->images[frameNumber]; }; |
---|
38 | |
---|
39 | private: |
---|
40 | std::vector<GLuint> textures; //!< The Texture-ID of opengl from this Texture. |
---|
41 | std::vector<SDL_Surface*> images; //!< The SDL_Surfce that stores the Texture on it. |
---|
42 | }; |
---|
43 | |
---|
44 | #endif /* _MULTI_FRAME_TEXTURE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.