Skip to content

Instantly share code, notes, and snippets.

@flagoworld
Created July 20, 2012 23:47
Show Gist options
  • Save flagoworld/3153901 to your computer and use it in GitHub Desktop.
Save flagoworld/3153901 to your computer and use it in GitHub Desktop.
while(running)
{
glClear(GL_COLOR_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0,1024,0.0,768,-1.0,1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glPushMatrix();
statemgr_render(mgrState);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(90,(float)1024/(float)768,1,100);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glEnable(GL_DEPTH_TEST);
glfwSwapBuffers();
running=!glfwGetKey(GLFW_KEY_ESC)&&glfwGetWindowParam(GLFW_OPENED);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment