- Timestamp:
- Jan 26, 2006, 5:49:58 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 7 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; -
trunk/src/world_entities/camera.cc
r6772 r6778 188 188 glLoadIdentity (); 189 189 190 // setting up the perspective191 190 gluPerspective(this->fovy, 192 191 this->aspectRatio, 193 192 this->nearClip, 194 193 this->farClip); 194 195 196 // setting up the perspective 195 197 // speed-up feature 196 198 Vector cameraPosition = this->getAbsCoor(); … … 205 207 up.x, up.y, up.z); 206 208 209 207 210 glMatrixMode (GL_MODELVIEW); 208 211 glLoadIdentity(); 212 213 214 209 215 } 210 216 -
trunk/src/world_entities/skysphere.cc
r6142 r6778 97 97 void Skysphere::draw() const 98 98 { 99 glMatrixMode(GL_MODELVIEW); 99 100 glPushMatrix(); 100 glMatrixMode(GL_MODELVIEW); 101 101 102 Vector r = this->getAbsCoor(); 102 103 glTranslatef(r.x, r.y, r.z); -
trunk/src/world_entities/weapons/test_gun.cc
r6671 r6778 219 219 220 220 /* draw objectComponent1: gun coil - animated stuff */ 221 glMatrixMode(GL_MODELVIEW);222 221 glPushMatrix(); 223 222 glTranslatef (this->objectComponent1->getAbsCoor ().x, -
trunk/src/world_entities/weapons/weapon_manager.cc
r6753 r6778 417 417 this->currentSlotConfig[i].position.activateNode(); 418 418 tickWeapon->setParent(&this->currentSlotConfig[i].position); 419 printf("ACTIVATE\n");420 419 } 421 420 else
Note: See TracChangeset
for help on using the changeset viewer.