Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8567 in orxonox.OLD


Ignore:
Timestamp:
Jun 17, 2006, 2:35:59 PM (18 years ago)
Author:
patrick
Message:

bsp: md3 model draws but its all screwed up:D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc

    r8566 r8567  
    3939    this->md3Data = new MD3Data(filename, filename, scaling);
    4040
    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");
    4242
    4343    this->tmpBoneFrame = new MD3BoneFrame();
     
    5454    for( int i = 0; i < this->md3Data->header->tagNum; i++)
    5555      this->tmpMatrix[i] = new float[16];
     56
     57    this->bDrawBones = false;
     58    this->bDrawNormals = false;
    5659  }
    5760
     
    7376  {
    7477
    75   }
     78    this->tick(time, this->md3Data);
     79  }
     80
    7681
    7782  void MD3Model::tick(float time, MD3Data* data)
     
    113118          this->drawMesh(mesh, frame);
    114119
    115 
    116 
    117 
    118120          // draw vertex normals if needed
    119121          if( this->bDrawNormals)
     
    132134
    133135
    134 
    135136    // draw all models linked to this model
    136137    std::map<int, MD3Data*>::iterator it = data->sortedMap.begin();
     
    152153          }
    153154          else {
    154         //no interpolation needed, stay with last transformation
    155         //OpenGL matrix is in column-major order
     155            //no interpolation needed, stay with last transformation
     156            //OpenGL matrix is in column-major order
    156157            m[0] = currFrameTag->matrix[0][0];
    157158            m[1] = currFrameTag->matrix[1][0];
     
    172173          }
    173174
    174       //switch to child coord system
     175          //switch to child coord system
    175176          glPushMatrix();
    176177          glMultMatrixf(m);
    177178
    178       // and draw child
    179           this->draw(child);
     179          // and draw child
     180          this->tick(time, child);
    180181
    181182          glPopMatrix();
     
    367368    float z2 = frame->maxs.z;
    368369
    369     glPushAttrib(GL_TEXTURE_2D);
    370     glPushAttrib(GL_LIGHTING);
     370//     glPushAttrib(GL_TEXTURE_2D);
     371//     glPushAttrib(GL_LIGHTING);
    371372
    372373    glColor3f(1.0f,0.0f,0.0f);
     
    407408    glEnd();
    408409
    409     glPopAttrib();
    410     glPopAttrib();
     410//     glPopAttrib();
     411//     glPopAttrib();
    411412  }
    412413
Note: See TracChangeset for help on using the changeset viewer.