Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4824 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons


Ignore:
Timestamp:
Jul 8, 2005, 1:24:12 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cleaned out the crosshair of the Player

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/crosshair.cc

    r4823 r4824  
    115115  GraphicsEngine::storeMatrices();
    116116
    117   GLdouble z;
     117  GLfloat z;
     118  glReadPixels ((int)position2D[0], GraphicsEngine::getInstance()->getResolutionY()-(int)position2D[1], 1, 1, GL_DEPTH_COMPONENT, GL_DOUBLE, &z);
     119
     120  printf("%p:: %d %d %f\n",this, (int)position2D[0], (int)position2D[1], z);
     121
    118122  GLdouble objX, objY, objZ;
    119123  if (gluUnProject(position2D[0],
    120124      GraphicsEngine::getInstance()->getResolutionY()-position2D[1],
    121       .8,
     125      z,
    122126      GraphicsEngine::modMat,
    123127      GraphicsEngine::projMat,
     
    126130      &objY,
    127131      &objZ ));
    128 
     132  /*
    129133  glBegin(GL_TRIANGLES);
    130134  glColor3f(1,0,0);
     
    133137  glVertex3f(objX, objY, objZ+1);
    134138  glEnd();
     139  */
    135140}
Note: See TracChangeset for help on using the changeset viewer.