Changeset 6169 in orxonox.OLD for branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
- Timestamp:
- Dec 20, 2005, 12:22:17 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
r6022 r6169 156 156 { 157 157 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); 158 165 } 159 166 … … 164 171 * FIXME 165 172 */ 166 void MD2Model::draw() 167 { 168 if( likely(this->animationState.localTime > 0.0)) 169 this->animate(); 170 171 glPushMatrix(); 173 void MD2Model::draw() const 174 { 175 // glPushMatrix(); 172 176 173 177 this->renderFrame(); 174 178 175 glPopMatrix();179 // glPopMatrix(); 176 180 } 177 181 … … 180 184 \brief this is an internal function to render this special frame selected by animate() 181 185 */ 182 void MD2Model::renderFrame() 186 void MD2Model::renderFrame() const 183 187 { 184 188 static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */ … … 191 195 glCullFace(GL_BACK); 192 196 193 this->processLighting(); 194 this->interpolate(verticesList); 197 195 198 this->data->material->select(); 196 199 … … 406 409 } 407 410 } 411 PRINTF(4)("Finished loading the md2 file\n"); 408 412 409 413 delete [] buffer;
Note: See TracChangeset
for help on using the changeset viewer.