Created
December 2, 2015 16:23
-
-
Save JossWhittle/c190fbf23f0fa91debb6 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
| glutInit(&argc, &argv); | |
| glutInitWindowSize(WIDTH, HEIGHT); | |
| // Centre Window | |
| int sw = glutGet(GLUT_SCREEN_WIDTH); | |
| int sh = glutGet(GLUT_SCREEN_HEIGHT); | |
| glutInitWindowPosition((sw / 2) - (WIDTH / 2), (sh / 2) - (HEIGHT / 2)); | |
| glutCreateWindow("Hello"); | |
| glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE); | |
| glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION); | |
| // Init Glew | |
| glewInit(); | |
| glutDisplayFunc(drawFunc); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment