Created
July 21, 2012 17:58
-
-
Save flagoworld/3156569 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while(running) | |
{ | |
glClear(GL_COLOR_BUFFER_BIT); | |
glDisable(GL_DEPTH_TEST); | |
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
glOrtho(0.0,1024,768,0,-1.0,1.0); | |
glMatrixMode(GL_MODELVIEW); | |
glLoadIdentity(); | |
//2d rendering | |
statemgr_render(mgrState); | |
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
gluPerspective(90,(float)1024/(float)768,10,100); | |
glMatrixMode(GL_MODELVIEW); | |
glViewport(0,0,1024,768); | |
glLoadIdentity(); | |
glEnable(GL_DEPTH_TEST); | |
//3d rendering | |
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