Changeset 6778 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Jan 26, 2006, 5:49:58 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r6772 r6778 321 321 // return -1; 322 322 } 323 glMatrixMode(GL_PROJECTION_MATRIX);324 glLoadIdentity();325 323 glViewport(0, 0, width, height); // Reset The Current Viewport 326 324 … … 451 449 glDisable(GL_LIGHTING); // will be set back when leaving 2D-mode 452 450 453 glViewport(0, 0, screen->w, screen->h);454 455 451 glMatrixMode(GL_PROJECTION); 456 452 glPushMatrix(); 457 453 glLoadIdentity(); 458 459 454 glOrtho(0.0, (GLdouble)screen->w, (GLdouble)screen->h, 0.0, 0.0, 1.0); 460 455 … … 462 457 glPushMatrix(); 463 458 glLoadIdentity(); 464 465 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);466 459 } 467 460 … … 585 578 void GraphicsEngine::draw() const 586 579 { 580 GraphicsEngine::storeMatrices(); 581 587 582 LightManager::getInstance()->draw(); 588 GraphicsEngine::storeMatrices(); 583 589 584 Shader::suspendShader(); 590 585 -
trunk/src/lib/graphics/light.cc
r6764 r6778 342 342 void LightManager::draw() const 343 343 { 344 glMatrixMode(GL_MODELVIEW); 345 glLoadIdentity(); 346 PRINTF(4)("Drawing the Lights\n"); 344 PRINTF(4)("Drawing the Lights\n"); 347 345 for (int i = 0; i < NUMBEROFLIGHTS; i++) 348 346 if (this->lights[i]) -
trunk/src/lib/graphics/render2D/element_2d.cc
r6512 r6778 820 820 else if (unlikely(this->bindNode != NULL)) 821 821 { 822 GLdouble projectPos[3] = {0 , 0,0};822 GLdouble projectPos[3] = {0.0, 0.0, 0.0}; 823 823 gluProject(this->bindNode->getAbsCoor().x, 824 824 this->bindNode->getAbsCoor().y, … … 830 830 projectPos+1, 831 831 projectPos+2); 832 // printf("%s::%s == %f %f %f :: %f %f\n", this->getClassName(), this->getName(), 833 // this->bindNode->getAbsCoor().x, 834 // this->bindNode->getAbsCoor().y, 835 // this->bindNode->getAbsCoor().z, 836 // projectPos[0], 837 // projectPos[1]); 838 832 839 this->prevRelCoordinate.x = this->absCoordinate.x = projectPos[0] /* /(float)GraphicsEngine::getInstance()->getResolutionX() */ + this->relCoordinate.x; 833 840 this->prevRelCoordinate.y = this->absCoordinate.y = (float)GraphicsEngine::getInstance()->getResolutionY() - projectPos[1] + this->relCoordinate.y;
Note: See TracChangeset
for help on using the changeset viewer.