Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 20, 2005, 12:22:17 AM (18 years ago)
Author:
patrick
Message:

christmas: model loading progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/lib/graphics/importer/md2Model.cc

    r6022 r6169  
    156156{
    157157  this->animationState.localTime += time;
     158
     159  if( likely(this->animationState.localTime > 0.0))
     160    this->animate();
     161
     162  static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
     163  this->processLighting();
     164  this->interpolate(verticesList);
    158165}
    159166
     
    164171 * FIXME
    165172 */
    166 void MD2Model::draw()
    167 {
    168   if( likely(this->animationState.localTime > 0.0))
    169     this->animate();
    170 
    171   glPushMatrix();
     173void MD2Model::draw() const
     174{
     175//   glPushMatrix();
    172176
    173177  this->renderFrame();
    174178
    175   glPopMatrix();
     179//   glPopMatrix();
    176180}
    177181
     
    180184  \brief this is an internal function to render this special frame selected by animate()
    181185*/
    182 void MD2Model::renderFrame()
     186void MD2Model::renderFrame() const
    183187{
    184188  static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
     
    191195  glCullFace(GL_BACK);
    192196
    193   this->processLighting();
    194   this->interpolate(verticesList);
     197
    195198  this->data->material->select();
    196199
     
    406409        }
    407410    }
     411    PRINTF(4)("Finished loading the md2 file\n");
    408412
    409413  delete [] buffer;
Note: See TracChangeset for help on using the changeset viewer.