void SetOrthoProjection()
{
//glPushAttrib(GL_DEPTH_TEST);
//glDisable(GL_DEPTH_TEST); // Turn depth testing off
glMatrixMode(GL_PROJECTION); // Switch to projection mode
glPushMatrix(); // Save previous matrix which contains the settings for the perspective projection
glLoadIdentity();
glOrtho(0, width, 0, height, -1, 1);
glMatrixMode(GL_MODELVIEW);
}
void ResetPersProjection()
{
glMatrixMode(GL_PROJECTION);
glPopMatrix(); // Pop the stack
glMatrixMode(GL_MODELVIEW); // Put us back in modelview mode
//glEnable(GL_DEPTH_TEST); // Turn depth testing back on
//glPopAttrib();
}