Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6175 in orxonox.OLD for branches/christmas_branche/src/lib


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

christmas: the md2model has now const draw functions

Location:
branches/christmas_branche/src/lib/graphics/importer
Files:
2 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();
  • branches/christmas_branche/src/lib/graphics/importer/md2Model.h

    r6172 r6175  
    143143  virtual ~MD2Model();
    144144
    145   virtual void draw();
     145  virtual void draw() const;
    146146
    147147  void setAnim(int type);
     
    160160  void processLighting();
    161161  void interpolate(sVec3D* verticesList);
    162   void renderFrame();
     162  void renderFrame() const ;
    163163
    164164
Note: See TracChangeset for help on using the changeset viewer.