Changeset 8567 in orxonox.OLD for branches/bsp_model/src
- Timestamp:
- Jun 17, 2006, 2:35:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8566 r8567 39 39 this->md3Data = new MD3Data(filename, filename, scaling); 40 40 41 MD3AnimationCfg cfg("/home/boenzlip/tmp/q3/Downloads/MOH/q3mdl-alien3/models/players/alien3/animation.cfg");41 // MD3AnimationCfg cfg("/home/boenzlip/tmp/q3/Downloads/MOH/q3mdl-alien3/models/players/alien3/animation.cfg"); 42 42 43 43 this->tmpBoneFrame = new MD3BoneFrame(); … … 54 54 for( int i = 0; i < this->md3Data->header->tagNum; i++) 55 55 this->tmpMatrix[i] = new float[16]; 56 57 this->bDrawBones = false; 58 this->bDrawNormals = false; 56 59 } 57 60 … … 73 76 { 74 77 75 } 78 this->tick(time, this->md3Data); 79 } 80 76 81 77 82 void MD3Model::tick(float time, MD3Data* data) … … 113 118 this->drawMesh(mesh, frame); 114 119 115 116 117 118 120 // draw vertex normals if needed 119 121 if( this->bDrawNormals) … … 132 134 133 135 134 135 136 // draw all models linked to this model 136 137 std::map<int, MD3Data*>::iterator it = data->sortedMap.begin(); … … 152 153 } 153 154 else { 154 //no interpolation needed, stay with last transformation155 //OpenGL matrix is in column-major order155 //no interpolation needed, stay with last transformation 156 //OpenGL matrix is in column-major order 156 157 m[0] = currFrameTag->matrix[0][0]; 157 158 m[1] = currFrameTag->matrix[1][0]; … … 172 173 } 173 174 174 //switch to child coord system175 //switch to child coord system 175 176 glPushMatrix(); 176 177 glMultMatrixf(m); 177 178 178 // and draw child179 this-> draw(child);179 // and draw child 180 this->tick(time, child); 180 181 181 182 glPopMatrix(); … … 367 368 float z2 = frame->maxs.z; 368 369 369 glPushAttrib(GL_TEXTURE_2D);370 glPushAttrib(GL_LIGHTING);370 // glPushAttrib(GL_TEXTURE_2D); 371 // glPushAttrib(GL_LIGHTING); 371 372 372 373 glColor3f(1.0f,0.0f,0.0f); … … 407 408 glEnd(); 408 409 409 glPopAttrib();410 glPopAttrib();410 // glPopAttrib(); 411 // glPopAttrib(); 411 412 } 412 413
Note: See TracChangeset
for help on using the changeset viewer.