Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2967 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Nov 24, 2004, 12:56:52 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: set first normal before, now it is correct. line-stepping corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/object.cc

    r2937 r2967  
    4848   \param scaling The factor that the object will be scaled with.
    4949*/
    50 
    5150Object::Object(char* fileName, float scaling)
    5251{
     
    9089  groupCount = 0;
    9190 
    92   initGroup (currentGroup);
     91  initGroup (firstGroup);
    9392  mtlFileName = "";
    9493  scaleFactor = 1;
    9594  material = new Material();
    9695
    97   glEnableClientState (GL_VERTEX_ARRAY);
     96  //  glEnableClientState (GL_VERTEX_ARRAY);
    9897  //  glEnableClientState (GL_NORMAL_ARRAY);
    9998  //  glEnableClientState (GL_TEXTURE_COORD_ARRAY);
     
    226225  group->name = "";
    227226  group->faceMode = -1;
    228   group->faceCount =0; 
     227  group->faceCount = 0; 
    229228  if ((group->listNumber = glGenLists(1)) == 0 )
    230229    {
     
    237236      group->firstVertex = 0;
    238237      group->firstNormal = 0;
    239       group->firstNormal = 0;
     238      group->firstVertexTexture = 0;
    240239    }
    241240  else
     
    265264  glEndList();
    266265}
     266
    267267/**
    268268   \brief deletes the Arrays of the Group to save space.
     
    480480      texture ++;
    481481      if (verbose>=3)
    482         printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
     482        printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*2, currentGroup->vTexture->getCount());
    483483      glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
    484484
     
    638638   \param matString the Material that will be set.
    639639*/
    640 
    641640bool Object::readUseMtl (char* matString)
    642641{
     
    670669  readVertex ("-0.500000 -0.500000 -0.500000");
    671670  readVertex ("0.500000 -0.500000 -0.500000");
     671
    672672  readVertexTexture ("0.000000 0.000000");
    673673  readVertexTexture ("1.000000 0.000000");
Note: See TracChangeset for help on using the changeset viewer.