Ignore:
Timestamp:
01/18/07 21:09:55 (17 years ago)
Author:
bittner
Message:

sil mutation

Location:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r1983 r1997  
    303303 
    304304 
    305  
     305void 
     306QtGlRendererWidget::InitGL() 
     307{ 
     308  GlRenderer::InitGL(); 
     309 
     310  GLfloat mat_ambient[]   = {  0.5, 0.5, 0.5, 1.0  }; 
     311  /*  mat_specular and mat_shininess are NOT default values     */ 
     312  GLfloat mat_diffuse[]   = {  1.0, 1.0, 1.0, 1.0  }; 
     313  GLfloat mat_specular[]  = {  0.3, 0.3, 0.3, 1.0  }; 
     314  GLfloat mat_shininess[] = {  1.0  }; 
     315   
     316  GLfloat light_ambient[]  = {  0.2, 0.2, 0.2, 1.0  }; 
     317  GLfloat light_diffuse[]  = {  0.4, 0.4, 0.4, 1.0  }; 
     318  GLfloat light_specular[] = {  0.3, 0.3, 0.3, 1.0  }; 
     319   
     320  GLfloat lmodel_ambient[] = {  0.3, 0.3, 0.3, 1.0  }; 
     321   
     322   
     323  // default Material 
     324  glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); 
     325  glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); 
     326  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); 
     327  glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); 
     328 
     329  // a light 
     330  glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); 
     331  glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); 
     332  glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); 
     333   
     334  glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient); 
     335  glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse); 
     336  glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular); 
     337   
     338  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); 
     339   
     340  glEnable(GL_LIGHTING); 
     341  glEnable(GL_LIGHT0); 
     342  glEnable(GL_LIGHT1); 
     343   
     344   
     345  // set position of the light 
     346  GLfloat infinite_light[] = {  1.0, 0.8, 1.0, 0.0  }; 
     347  glLightfv (GL_LIGHT0, GL_POSITION, infinite_light); 
     348   
     349  // set position of the light2 
     350  GLfloat infinite_light2[] = {  -0.3, 1.5, 1.0, 0.0  }; 
     351  glLightfv (GL_LIGHT1, GL_POSITION, infinite_light2); 
     352   
     353  glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); 
     354  //   glColorMaterial( GL_FRONT_AND_BACK, GL_SPECULAR); 
     355  glEnable(GL_COLOR_MATERIAL); 
     356   
     357  glShadeModel( GL_FLAT ); 
     358} 
    306359 
    307360 
     
    617670          RenderErrors(); 
    618671        } else { 
     672          glColor3f(0.6f, 0.6f, 0.6f); 
    619673          RenderPvs(); 
    620674        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h

    r1948 r1997  
    172172        InitGL(); 
    173173  } 
     174 
     175  virtual void InitGL(); 
     176   
    174177  void resizeGL(int w, int h); 
    175178  void paintGL(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.cpp

    r1983 r1997  
    5252        if (mRenderer->mRenderViewCells)  
    5353          mRenderer->RenderViewCells(); 
    54          
     54 
     55        glColor3f(0.8f, 0.8f, 0.8f); 
    5556        mRenderer->RenderPvs(); 
    5657 
Note: See TracChangeset for help on using the changeset viewer.