World of Rigid Bodies (WoRB)
|
Establishes temporarily orthogonal projection in screen coordinates. More...
#include <Utilities.h>
Public Member Functions | |
GLOrthoScreen () | |
Constructor; saves the current and establishes a new transformation. | |
~GLOrthoScreen () | |
Destructor; restores the earlier transformation. |
Establishes temporarily orthogonal projection in screen coordinates.
Definition at line 251 of file Utilities.h.
WoRB::GLOrthoScreen::GLOrthoScreen | ( | ) | [inline] |
Constructor; saves the current and establishes a new transformation.
Definition at line 256 of file Utilities.h.
{ glDisable( GL_DEPTH_TEST ); // Temporarily set up the view in orthographic projection. // glMatrixMode( GL_PROJECTION ); glPushMatrix (); glLoadIdentity (); glOrtho( /* left */ 0.0, /* right */ glutGet( GLUT_WINDOW_WIDTH ), /* bottom */ 0.0, /* top */ glutGet( GLUT_WINDOW_HEIGHT ), /* zNear */ -1.0, /* zFar */ 1.0 ); glMatrixMode( GL_MODELVIEW ); glPushMatrix (); glLoadIdentity (); }
WoRB::GLOrthoScreen::~GLOrthoScreen | ( | ) | [inline] |
Destructor; restores the earlier transformation.
Definition at line 279 of file Utilities.h.
{ // Go back to projection mode // glPopMatrix (); glMatrixMode( GL_PROJECTION ); glPopMatrix (); glMatrixMode( GL_MODELVIEW ); glEnable( GL_DEPTH_TEST ); }