Changeset 1997 for GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Timestamp:
- 01/18/07 21:09:55 (17 years ago)
- 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 303 303 304 304 305 305 void 306 QtGlRendererWidget::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 } 306 359 307 360 … … 617 670 RenderErrors(); 618 671 } else { 672 glColor3f(0.6f, 0.6f, 0.6f); 619 673 RenderPvs(); 620 674 } -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r1948 r1997 172 172 InitGL(); 173 173 } 174 175 virtual void InitGL(); 176 174 177 void resizeGL(int w, int h); 175 178 void paintGL(); -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.cpp
r1983 r1997 52 52 if (mRenderer->mRenderViewCells) 53 53 mRenderer->RenderViewCells(); 54 54 55 glColor3f(0.8f, 0.8f, 0.8f); 55 56 mRenderer->RenderPvs(); 56 57
Note: See TracChangeset
for help on using the changeset viewer.