Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6532 in orxonox.OLD for trunk/src/lib/graphics/importer


Ignore:
Timestamp:
Jan 18, 2006, 1:20:02 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged branches/movie_play to the trunk. no conflicts, but a minor virtual function BUG

Location:
trunk/src/lib/graphics/importer
Files:
4 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/Makefile.am

    r6455 r6532  
    1414                           texture.cc \
    1515                           texture_sequence.cc \
    16                            height_map.cc
     16                           height_map.cc \
     17                           media_container.cc \
     18                           movie_player.cc
    1719
    1820libtc_a_SOURCES  = tc.cc
     
    3234                 height_map.h \
    3335                 anorms.h \
    34                  anormtab.h
     36                 anormtab.h \
     37                 media_container.h \
     38                 movie_player.h
  • trunk/src/lib/graphics/importer/texture.cc

    r6523 r6532  
    199199                               0xFF000000
    200200#else
    201                                    0xFF000000,
     201                               0xFF000000,
    202202                               0x00FF0000,
    203203                               0x0000FF00,
  • trunk/src/lib/graphics/importer/texture_sequence.cc

    r5885 r6532  
    4747TextureSequence::~TextureSequence()
    4848{
     49  this->clearLists();
     50}
     51
     52void TextureSequence::clearLists()
     53{
    4954  // delete all images
    5055  while(!this->images.empty())
     
    5459  }
    5560
    56   this->setTexture(0);
    5761  // delete all textures.
    5862  while(!this->textures.empty())
     
    6367  }
    6468}
    65 
    6669
    6770/**
     
    149152  }
    150153  this->setAlpha(hasAlpha);
     154
    151155  return true;
    152156}
    153157
     158/**
     159 * @brief adds a new Frame at the end of the Sequence.
     160 * @param texture the texture to add at the end of the Sequence.
     161 */
     162bool TextureSequence::addFrame(GLuint texture)
     163{
     164  if (texture == 0)
     165    return false;
     166  this->textures.push_back(texture);
    154167
     168  return true;
     169}
    155170
    156171/**
     
    158173 * @param frameNumber the n-th frame
    159174 */
    160 void TextureSequence::gotoFrame(unsigned int frameNumber)
     175/*void TextureSequence::gotoFrame(unsigned int frameNumber)
    161176{
    162177  if (this->textures.size() > frameNumber)
    163178    this->setTexture(this->textures[frameNumber]);
    164179}
     180*/
  • trunk/src/lib/graphics/importer/texture_sequence.h

    r5865 r6532  
    2929    bool addFrame(const char* image);
    3030    bool addFrame(SDL_Surface* surface);
     31    bool addFrame(GLuint texture);
     32
     33    void clearLists();
    3134
    3235    virtual bool rebuild();
     
    3538    inline unsigned int getFrameCount() const { return this->textures.size(); };
    3639
    37     void gotoFrame(unsigned int frameNumber);
     40    //void gotoFrame(unsigned int frameNumber);
    3841    /** @returns The textureID of the Frame @param frameNumber the n-th frame this texture-series.  */
    3942    inline GLuint getFrameTexture(unsigned int frameNumber) const { return (this->textures.size()>frameNumber)?this->textures[frameNumber]:0; };
Note: See TracChangeset for help on using the changeset viewer.