From: Daniel Karbach Date: Fri, 13 Feb 2015 09:04:58 +0000 (+0100) Subject: enable backface culling X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=59fe611e6ee06f8e9445f1b19339a1f158c9322c;p=blank.git enable backface culling --- diff --git a/src/app.cpp b/src/app.cpp index 051a5f0..3de246c 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -39,6 +39,7 @@ Application::Application() , up(false) , down(false) { GLContext::EnableVSync(); + GLContext::EnableBackfaceCulling(); program.LoadShader( GL_VERTEX_SHADER, "#version 330 core\n" diff --git a/src/init.cpp b/src/init.cpp index 4772898..40f76de 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -142,6 +142,10 @@ void GLContext::EnableVSync() { } } +void GLContext::EnableBackfaceCulling() { + glEnable(GL_CULL_FACE); +} + InitGLEW::InitGLEW() { glewExperimental = GL_TRUE; diff --git a/src/init.hpp b/src/init.hpp index a2f2de7..51ab3f8 100644 --- a/src/init.hpp +++ b/src/init.hpp @@ -83,6 +83,7 @@ public: GLContext &operator =(const GLContext &) = delete; static void EnableVSync(); + static void EnableBackfaceCulling(); private: SDL_GLContext handle;