X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;ds=sidebyside;f=src%2Fopengl%2Fopengl.cc;h=417966dcd06c8da8ab7c66f6ab53d569296b843a;hb=63d7f3b0e70ab5e3d530c579b1881967c96b0b92;hp=d2aea3b27b3574b74c43c08ebb8bccdacc6af06b;hpb=826b0cf7adaf8b1dc4c37f57a4a98c79a3995e21;p=demo diff --git a/src/opengl/opengl.cc b/src/opengl/opengl.cc index d2aea3b..417966d 100644 --- a/src/opengl/opengl.cc +++ b/src/opengl/opengl.cc @@ -7,10 +7,6 @@ extern GLFWwindow *win; extern int win_h; extern int win_w; -/* static test_* functions are going to be removed: just to test the shaders */ -static void test_draw(); -static void test_torus(); - bool init_opengl() { if(!glfwInit()) { @@ -28,6 +24,10 @@ bool init_opengl() glfwMakeContextCurrent(win); glewInit(); + + glEnable(GL_DEPTH_TEST); + glEnable(GL_CULL_FACE); + return true; } @@ -37,17 +37,4 @@ void cleanup_opengl() glfwDestroyWindow(win); } glfwTerminate(); -} - -void display_opengl() -{ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glClearColor(0.5, 0.5, 0.5, 1.0); - -} - -static void test_draw() -{ - /* this function is going to be removed, it's here only to test the shaders */ - } \ No newline at end of file