Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 5, 2006, 8:23:48 PM (19 years ago)
Author:
bottac
Message:

bsp_file looks now in the orxonox data-directory for textures.

File:
1 edited

Legend:

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

    r7511 r7544  
    189189  }
    190190  if(curFace.type == 3) return;
    191   // if(this->bspFile->Materials[curFace.texture] != NULL)
    192   //if(this->lastTex != curFace.texture) {
     191//  if(this->bspFile->Materials[curFace.texture] != NULL)
     192   
     193  if(this->lastTex != curFace.texture) {
    193194    this->bspFile->Materials[curFace.texture].mat->select();
    194   //   this->lastTex = curFace.texture;
    195   //}
     195     this->lastTex = curFace.texture;
     196  }
    196197   
    197198    if(curFace.lm_index < 0)
     
    208209    }
    209210   
    210     glColor4f(3.0,3.0,3.0,0.9);
    211   glEnableClientState(GL_VERTEX_ARRAY ); 
    212   //glEnableClientState(GL_TEXTURE_COORD_ARRAY );
     211    glColor4f(3.0,3.0,3.0,1.0);
     212  glEnableClientState(GL_VERTEX_ARRAY );
     213  glEnableClientState(GL_TEXTURE_COORD_ARRAY );
    213214  glEnableClientState(GL_NORMAL_ARRAY );
    214215  //  glEnableClientState(GL_COLOR_ARRAY);
     
    223224  glClientActiveTextureARB(GL_TEXTURE1_ARB);
    224225  glTexCoordPointer(2, GL_FLOAT, stride, &(curVertex[offset].texcoord[1]));
    225   glEnableClientState(GL_TEXTURE_COORD_ARRAY);
     226  //glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    226227
    227228 
     
    287288void BspManager::draw_patch(face* Face)
    288289{
    289   //if(this->lastTex != Face->texture) {
     290  if(this->lastTex != Face->texture) {
    290291    this->bspFile->Materials[Face->texture].mat->select();
    291     //this->lastTex = Face->texture;
    292   //}
     292    this->lastTex = Face->texture;
     293  }
    293294 
    294295 
     
    306307    glEnable(GL_TEXTURE_2D);
    307308}
    308     glColor4f(3.0,3.0,3.0,0.9);
     309    glColor4f(3.0,3.0,3.0,1.0);
    309310 
    310311  glEnable( GL_AUTO_NORMAL);
     
    328329    glClientActiveTextureARB(GL_TEXTURE1_ARB);
    329330    glTexCoordPointer(2, GL_FLOAT, 44, &((((BspVertex*)(this->bspFile->patchVertice))[8*8*(Face->meshvert+i)]).texcoord[1][0]));
    330     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
     331    //glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    331332
    332333   
Note: See TracChangeset for help on using the changeset viewer.