Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2005, 8:38:37 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: some initial work at MultiFrameTexture.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/multi_frame_texture.h

    r5859 r5860  
    1010
    1111#include "glincl.h"
     12
    1213#include <vector>
     14#include <stdarg.h>
    1315
    1416/* Forward Declaration */
     
    1618
    1719//! A Class, that reads in Textures from different fileformats.
    18   class MultiFrameTexture : public Texture
    19   {
    20     public:
    21       MultiFrameTexture(unsigned int count, ...);
     20class MultiFrameTexture : public Texture
     21{
     22  public:
     23    MultiFrameTexture(unsigned int count = 0, ...);
    2224  //  Texture(TEXTURE_TYPE type, int resolution);
    23       ~MultiFrameTexture();
     25    ~MultiFrameTexture();
    2426
    25       bool loadImages(unsigned int cound, ...);
    26       bool rebuild();
     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);
    2731
    28       /** @returns The textureID of this texture.  */
    29       inline GLuint getFrameTexture(unsigned int frameNumber) const { return this->textures[frameNumber]; };
     32    virtual bool rebuild();
    3033
    31       const SDL_Surface* const getFrameImage(unsigned int frameNumber) const { return this->images[frameNumber]; };
     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]; };
    3238
    33     private:
    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.
    36   };
     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};
    3743
    3844#endif /* _MULTI_FRAME_TEXTURE_H */
Note: See TracChangeset for help on using the changeset viewer.