Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2005, 12:14:54 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: modified the texture loader to use the sdl-image libraries, this will use material/texture classes from orxonox later

Location:
orxonox/branches/md2_loader/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/world_entities/test_entity.cc

    r4155 r4157  
    2828TestEntity::TestEntity () : WorldEntity()
    2929{
    30  //This is for md2 test purposes only! if this is seen in the trunk: hit me :)
     30  this->textureArray = new unsigned int[100];
     31  memset(this->textureArray, 0, 100*sizeof(unsigned int));
     32 
    3133  MD2Loader* md2loader = new MD2Loader();
    3234  this->model = new t3DModel;
    3335  this->md2Model = new MD2Model();
    3436
    35   md2loader->importMD2(model, "../data/models/tris.md2", "test.bmp");
     37  md2loader->importMD2(this->model, "../data/models/tris.md2", "../data/models/tris.pcx");
     38
     39  for(int i = 0; i < this->model->numOfMaterials; i++)
     40    {
     41      if( strlen(this->model->materialList[i].strFile) > 0)
     42        {
     43          Helper::createTexture(textureArray, this->model->materialList[i].strFile, i);
     44        }
     45      this->model->materialList[i].texureId = i;
     46    }
    3647}
    3748
  • orxonox/branches/md2_loader/src/world_entities/test_entity.h

    r4152 r4157  
    2727  t3DModel* model;
    2828  MD2Model* md2Model;
     29
     30  unsigned int* textureArray;
     31
    2932};
    3033
Note: See TracChangeset for help on using the changeset viewer.