Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10643 in orxonox.OLD for trunk/src/lib/graphics/importer/bsp


Ignore:
Timestamp:
Apr 29, 2007, 6:51:28 PM (18 years ago)
Author:
bknecht
Message:

improvements by landauf on bsp, rotor and wireframe (does build, should work)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/lib/graphics/importer/bsp/bsp_manager.cc

    r10618 r10643  
    504504    //  glDisable(GL_BLEND);
    505505  }
     506 
     507  if (State::showWireframe())
     508  {
     509    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
     510    glBindTexture(GL_TEXTURE_2D, this->bspFile->whiteLightMap );
     511    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
     512  }
    506513
    507514  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    508515
    509   // glColor4f(3.0,3.0,3.0,1.0);
    510516  glEnableClientState(GL_VERTEX_ARRAY );
    511517  glEnableClientState(GL_TEXTURE_COORD_ARRAY );
     
    536542  glDisableClientState(GL_NORMAL_ARRAY );
    537543  // glDisableClientState(GL_COLOR_ARRAY);
    538 
     544 
     545  if (State::showWireframe())
     546  {
     547    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
     548    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
     549  }
    539550}
    540551
     
    592603  if (Face->effect != -1) return;
    593604
    594 
    595605  if(Face->lm_index < 0) {
    596606    glActiveTextureARB(GL_TEXTURE1_ARB);
     
    602612    glEnable(GL_TEXTURE_2D);
    603613  }
    604   //glColor4f(3.0,3.0,3.0,1.0);
     614 
     615  if (State::showWireframe())
     616  {
     617    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
     618    glBindTexture(GL_TEXTURE_2D, this->bspFile->whiteLightMap );
     619    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
     620  }
     621
    605622
    606623  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     
    646663  glDisableClientState(GL_VERTEX_ARRAY );
    647664  glDisableClientState(GL_TEXTURE_COORD_ARRAY );
    648 
    649 
     665 
     666  if (State::showWireframe())
     667  {
     668    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
     669    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
     670  }
    650671}
    651672
Note: See TracChangeset for help on using the changeset viewer.