Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6763 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jan 26, 2006, 3:20:27 AM (19 years ago)
Author:
bensch
Message:

trunk: setting lighting

Location:
trunk/src/lib/graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.cc

    r6651 r6763  
    9595{
    9696  // setting diffuse color
    97   glColor3f (diffuse[0], diffuse[1], diffuse[2]);
    98   glMaterialfv(GL_FRONT, GL_DIFFUSE, this->diffuse);
     97  glColor4f (diffuse[0], diffuse[1], diffuse[2], this->transparency);
     98//  glMaterialfv(GL_FRONT, GL_DIFFUSE, this->diffuse);
    9999
    100100  // setting ambient color
  • trunk/src/lib/graphics/light.cc

    r6512 r6763  
    221221
    222222  glEnable (GL_LIGHTING);
     223  glEnable ( GL_COLOR_MATERIAL ) ;
     224  glColorMaterial ( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ) ;
     225
    223226  this->setAmbientColor(.3, .3, .3);
    224227  this->lights = new Light*[NUMBEROFLIGHTS];
     
    238241LightManager::~LightManager ()
    239242{
     243  glDisable(GL_COLOR_MATERIAL);
    240244  glDisable(GL_LIGHTING);
    241245  this->setAmbientColor(.0,.0,.0);
Note: See TracChangeset for help on using the changeset viewer.