Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6778 in orxonox.OLD for trunk/src/lib/graphics


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

trunk: ModelView work…

Location:
trunk/src/lib/graphics
Files:
3 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;
Note: See TracChangeset for help on using the changeset viewer.