Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6778 in orxonox.OLD


Ignore:
Timestamp:
Jan 26, 2006, 5:49:58 PM (18 years ago)
Author:
bensch
Message:

trunk: ModelView work…

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r6772 r6778  
    321321      //    return -1;
    322322    }
    323     glMatrixMode(GL_PROJECTION_MATRIX);
    324     glLoadIdentity();
    325323    glViewport(0, 0, width, height);                     // Reset The Current Viewport
    326324
     
    451449  glDisable(GL_LIGHTING);  // will be set back when leaving 2D-mode
    452450
    453   glViewport(0, 0, screen->w, screen->h);
    454 
    455451  glMatrixMode(GL_PROJECTION);
    456452  glPushMatrix();
    457453  glLoadIdentity();
    458 
    459454  glOrtho(0.0, (GLdouble)screen->w, (GLdouble)screen->h, 0.0, 0.0, 1.0);
    460455
     
    462457  glPushMatrix();
    463458  glLoadIdentity();
    464 
    465   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
    466459}
    467460
     
    585578void GraphicsEngine::draw() const
    586579{
     580  GraphicsEngine::storeMatrices();
     581
    587582  LightManager::getInstance()->draw();
    588   GraphicsEngine::storeMatrices();
     583
    589584  Shader::suspendShader();
    590585
  • trunk/src/lib/graphics/light.cc

    r6764 r6778  
    342342void LightManager::draw() const
    343343{
    344   glMatrixMode(GL_MODELVIEW);
    345   glLoadIdentity();
    346   PRINTF(4)("Drawing the Lights\n");
     344 PRINTF(4)("Drawing the Lights\n");
    347345  for (int i = 0; i < NUMBEROFLIGHTS; i++)
    348346    if (this->lights[i])
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r6512 r6778  
    820820    else if (unlikely(this->bindNode != NULL))
    821821    {
    822       GLdouble projectPos[3] = {0, 0, 0};
     822      GLdouble projectPos[3] = {0.0, 0.0, 0.0};
    823823      gluProject(this->bindNode->getAbsCoor().x,
    824824                 this->bindNode->getAbsCoor().y,
     
    830830                 projectPos+1,
    831831                 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
    832839      this->prevRelCoordinate.x = this->absCoordinate.x = projectPos[0] /* /(float)GraphicsEngine::getInstance()->getResolutionX() */ + this->relCoordinate.x;
    833840      this->prevRelCoordinate.y = this->absCoordinate.y = (float)GraphicsEngine::getInstance()->getResolutionY() -  projectPos[1] + this->relCoordinate.y;
  • trunk/src/world_entities/camera.cc

    r6772 r6778  
    188188  glLoadIdentity ();
    189189
    190   // setting up the perspective
    191190  gluPerspective(this->fovy,
    192191                 this->aspectRatio,
    193192                 this->nearClip,
    194193                 this->farClip);
     194
     195
     196    // setting up the perspective
    195197  // speed-up feature
    196198  Vector cameraPosition = this->getAbsCoor();
     
    205207            up.x, up.y, up.z);
    206208
     209
    207210  glMatrixMode (GL_MODELVIEW);
    208211  glLoadIdentity();
     212
     213
     214
    209215}
    210216
  • trunk/src/world_entities/skysphere.cc

    r6142 r6778  
    9797void Skysphere::draw() const
    9898{
     99  glMatrixMode(GL_MODELVIEW);
    99100  glPushMatrix();
    100   glMatrixMode(GL_MODELVIEW);
     101
    101102  Vector r = this->getAbsCoor();
    102103  glTranslatef(r.x, r.y, r.z);
  • trunk/src/world_entities/weapons/test_gun.cc

    r6671 r6778  
    219219
    220220  /* draw objectComponent1: gun coil - animated stuff */
    221   glMatrixMode(GL_MODELVIEW);
    222221  glPushMatrix();
    223222  glTranslatef (this->objectComponent1->getAbsCoor ().x,
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6753 r6778  
    417417        this->currentSlotConfig[i].position.activateNode();
    418418        tickWeapon->setParent(&this->currentSlotConfig[i].position);
    419         printf("ACTIVATE\n");
    420419      }
    421420      else
Note: See TracChangeset for help on using the changeset viewer.