Changeset 2719 for GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Timestamp:
- 05/27/08 18:48:22 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2717 r2719 20 20 #include "ObjectPlacer.h" 21 21 22 #define TEASER 1 22 23 23 24 #define USE_CG 1 … … 246 247 247 248 // mat_specular and mat_shininess are NOT default values 248 GLfloat mat_ambient[] = {0. 5f, 0.5f, 0.5f, 1.0f};249 GLfloat mat_ambient[] = {0.2f, 0.2f, 0.2f, 1.0f}; 249 250 GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f}; 250 251 GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f}; … … 256 257 glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); 257 258 258 GLfloat light_ambient[] = {0. 3, 0.3, 0.3, 1.0};259 GLfloat light_ambient[] = {0.1, 0.1, 0.1, 1.0}; 259 260 //GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0}; 260 GLfloat light_diffuse[] = {0. 6, 0.6, 0.6, 1.0};261 GLfloat light_diffuse[] = {0.5, 0.5, 0.5, 1.0}; 261 262 GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0}; 262 263 263 264 glEnable(GL_LIGHTING); 264 //GLfloat light_position[] = {278.0f, 548.8f,279.0f, 1.0f};265 //GLfloat light_position[] = {0.f, 0.f, 0.f, 1.0f}; 266 GLfloat light_position[] = {0.f, 0.0f, 0.f, 1.0f};267 265 GLfloat light_position[] = {0.f, 0.f, 0.f, 1.0f}; 266 267 // lights in arena 268 268 269 glEnable(GL_LIGHT0); 269 270 … … 272 273 glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); 273 274 glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); 274 glLightfv (GL_LIGHT0, GL_POSITION, light_position); 275 275 276 277 278 276 279 glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); 277 280 glEnable(GL_COLOR_MATERIAL); 278 281 279 GLfloat lmodel_ambient[] = {0. 3f, 0.3f, 0.3f, 1.0f};282 GLfloat lmodel_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f}; 280 283 glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); 281 284 … … 466 469 467 470 // mat_specular and mat_shininess are NOT default values 468 GLfloat mat_ambient[] = {0. 5f, 0.5f, 0.5f, 1.0f};471 GLfloat mat_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f}; 469 472 GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f}; 470 473 GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f}; … … 480 483 481 484 // a light 482 GLfloat light_ambient[] = {0. 3, 0.3, 0.3, 1.0};483 GLfloat light_diffuse[] = {0. 6, 0.6, 0.6, 1.0};484 GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0};485 GLfloat light_position[] = {0.f, .0f, 0.f, 1.0f};485 GLfloat light_ambient[] = {0.05, 0.05, 0.05, 1.0}; 486 GLfloat light_diffuse[] = {0.7, 0.7, 0.7, 1.0}; 487 GLfloat light_specular[] = {0.3, 0.3, 0.3, 1.0}; 488 //GLfloat light_position[] = {0.f, .0f, 0.f, 1.0f}; 486 489 //GLfloat light_position[] = {600.0f, 250.0f, -500.f, 1.0f}; 487 490 //GLfloat light_position[] = {278.0f, 548.8f,279.0f, 1.0f}; 491 492 488 493 489 494 glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); … … 491 496 glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); 492 497 493 glLightfv(GL_LIGHT0, GL_POSITION, light_position); 494 495 //glDisable(GL_LIGHT0); 496 glEnable(GL_LIGHT0); 498 glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 1); 499 glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0); 500 glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0); 501 502 // GLfloat light1_position[] = {-22.076887, 21.070816, 50.272095}; 503 504 // GLfloat light1_position[] = {0, 0, -100}; 497 505 498 506 glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient); 499 507 glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse); 500 508 glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular); 501 502 // set position of the light2 503 GLfloat infinite_light2[] = { -0.3, 1.5, 1.0, 0.0 }; 504 glLightfv (GL_LIGHT1, GL_POSITION, infinite_light2); 505 //glEnable(GL_LIGHT1); 506 507 GLfloat lmodel_ambient[] = {0.3f, 0.3f, 0.3f, 1.0f}; 509 510 glLightf(GL_LIGHT1, GL_CONSTANT_ATTENUATION, 1.0f); 511 glLightf(GL_LIGHT1, GL_LINEAR_ATTENUATION, 0); 512 glLightf(GL_LIGHT1, GL_QUADRATIC_ATTENUATION, 0); 513 514 515 glLightfv(GL_LIGHT2, GL_AMBIENT, light_ambient); 516 glLightfv(GL_LIGHT2, GL_DIFFUSE, light_diffuse); 517 glLightfv(GL_LIGHT2, GL_SPECULAR, light_specular); 518 519 520 glEnable(GL_LIGHT0); 521 glEnable(GL_LIGHT1); 522 glEnable(GL_LIGHT2); 523 524 525 GLfloat lmodel_ambient[] = {0.05f, 0.05f, 0.05f, 1.0f}; 508 526 glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); 509 527 510 528 glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); 511 529 //glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); … … 732 750 glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); 733 751 752 #if TEASER 753 glColor3f(0.0f, 0.8f, 0.0f); 754 #else 734 755 glColor3f(0.6f, 0.6f, 0.6f); 735 756 #endif 757 736 758 // Render PVS 737 759 VisualizePvs(); … … 986 1008 SetupCameraProjection(width(), height()); 987 1009 SetupCamera(); 1010 1011 GLfloat light0_position[] = {22.495655, 21.070816, -1001.375000}; 1012 GLfloat light1_position[] = {-22.076887, 21.070816, -997.272095}; 1013 GLfloat light2_position[] = { 0.3, 1.5, -0.3, 0.0 }; 1014 1015 glLightfv (GL_LIGHT0, GL_POSITION, light0_position); 1016 glLightfv (GL_LIGHT1, GL_POSITION, light1_position); 1017 glLightfv (GL_LIGHT2, GL_POSITION, light2_position); 988 1018 989 1019 if (mRenderErrors)
Note: See TracChangeset
for help on using the changeset viewer.