wall noise and arbitrary render resolution option
[raydungeon] / src / main.c
index e96732f..c0038dd 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
+#include "opengl.h"
 #include "miniglut.h"
 #include "game.h"
 
@@ -34,7 +35,7 @@ static PROC wgl_swap_interval_ext;
 int main(int argc, char **argv)
 {
        glutInit(&argc, argv);
-       glutInitWindowSize(1280, 800);
+       glutInitWindowSize(1280, 720);
        glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
        glutCreateWindow("raydungeon");
 
@@ -49,6 +50,10 @@ int main(int argc, char **argv)
        glutMotionFunc(motion);
        glutPassiveMotionFunc(motion);
 
+       if(init_opengl() == -1) {
+               return 1;
+       }
+
 #if defined(__unix__) || defined(unix)
        xdpy = glXGetCurrentDisplay();
        xwin = glXGetCurrentDrawable();