Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4234 in orxonox.OLD


Ignore:
Timestamp:
May 20, 2005, 1:40:47 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: fixed the segfault bug: the glcommand list had some offset problems :)

Location:
orxonox/branches/md2_loader/src/lib/graphics/importer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h

    r4172 r4234  
    6868  short indexToTexCoor[3];              //!< index to the texture coordinates
    6969} sTriangle;
     70
     71
     72typedef struct
     73{
     74   float s, t;
     75   int vertexIndex;
     76} glCommandVertex;
    7077
    7178
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc

    r4232 r4234  
    562562  this->pVertices = new sVec3D[this->numVertices * this->numFrames];
    563563  this->pGLCommands = new int[this->numGLCommands];
     564  //this->pGLCommands2 = new int[this->numGLCommands];
    564565  this->pLightNormals = new int[this->numVertices * this->numFrames];
    565566  buffer = new char[this->numFrames * this->header->frameSize];
     
    571572  fseek(pFile, this->header->offsetGlCommands, SEEK_SET);
    572573  fread(this->pGLCommands, sizeof(int), this->numGLCommands, pFile);
     574  //fread(this->pGLCommands2, sizeof(glCommandVertex), this->numGLCommands, pFile);
    573575
    574576  for(int i = 0; i < this->numFrames; ++i)
     
    629631 
    630632  //printf("numFrames: %i\n", this->numFrames);
    631   // printf("currentFrame: %i\n", this->animationState.currentFrame);
     633  //printf("currentFrame: %i\n", this->animationState.currentFrame);
    632634 
    633635    //for(int i = 0; i < this->numFrames; ++i)
     
    765767  while( int i = *(pCommands++)) /* strange looking while loop for maximum performance */
    766768    {
    767       int i;
    768769      if( i < 0)
    769770        {
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h

    r4232 r4234  
    243243  int* pGLCommands;
    244244  int* pLightNormals;
     245  glCommandVertex* pGLCommands2;
    245246
    246247  unsigned int textureID;
Note: See TracChangeset for help on using the changeset viewer.