Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5086 in orxonox.OLD for trunk


Ignore:
Timestamp:
Aug 20, 2005, 3:53:04 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: corrected the md2 bug. it was a silly very hard to trace bug. But now, md2 rocks

File:
1 edited

Legend:

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

    r5085 r5086  
    116116  nextVec = &this->data->pVertices[this->data->numVertices * this->animationState.nextFrame];
    117117
    118   for(int i = 0; i < this->data->numFrames; ++i)
    119     {
    120       verticesList[i][0] = (currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]));
    121       verticesList[i][1] = (currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]));
    122       verticesList[i][2] = (currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]));
     118  for( int i = 0; i < this->data->numVertices; ++i)
     119    {
     120      verticesList[i][0] = currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]);
     121      verticesList[i][1] = currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]);
     122      verticesList[i][2] = currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]);
    123123    }
    124124}
     
    169169  glPushMatrix();
    170170
    171     this->renderFrameGLList();
     171  this->renderFrameGLList();
    172172//  this->renderFrameTriangles();
    173173
     
    194194  this->data->material->select();
    195195
     196  printf("=============================FRAME\n");
    196197  /* draw the triangles */
    197198  while( int i = *(pCommands++)) /* strange looking while loop for maximum performance */
     
    210211      for(; i > 0; i--, pCommands += 3) /* down counting for loop, next 3 gl commands */
    211212        {
    212  verticesList[pCommands[2]][2]);
    213213          glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] );
    214214          glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]);
Note: See TracChangeset for help on using the changeset viewer.