Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 20, 2005, 2:47:35 AM (18 years ago)
Author:
patrick
Message:

christmas: the md2model has now const draw functions

File:
1 edited

Legend:

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

    r6172 r6175  
    149149
    150150
     151static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
     152
    151153/**
    152154  \brief sets the time in seconds passed since the last tick
     
    160162    this->animate();
    161163
    162    this->renderFrame();
     164  this->processLighting();
     165  this->interpolate(verticesList);
    163166}
    164167
     
    169172 * FIXME
    170173 */
    171 void MD2Model::draw()
    172 {
    173 
    174 
    175 
    176   //   glPushMatrix();
    177 
    178   //this->renderFrame();
    179 
    180 //   glPopMatrix();
     174void MD2Model::draw() const
     175{
     176  glPushMatrix();
     177  this->renderFrame();
     178  glPopMatrix();
    181179}
    182180
     
    185183  \brief this is an internal function to render this special frame selected by animate()
    186184*/
    187 void MD2Model::renderFrame()
    188 {
    189   static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
     185void MD2Model::renderFrame() const
     186{
    190187  int* pCommands = this->data->pGLCommands;
    191188
     
    196193  glCullFace(GL_BACK);
    197194
    198   this->processLighting();
    199   this->interpolate(verticesList);
    200195
    201196  this->data->material->select();
Note: See TracChangeset for help on using the changeset viewer.