]> git.localhorst.tv Git - blank.git/commitdiff
enable backface culling
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 13 Feb 2015 09:04:58 +0000 (10:04 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 13 Feb 2015 09:04:58 +0000 (10:04 +0100)
src/app.cpp
src/init.cpp
src/init.hpp

index 051a5f0f0975944af4059cc5c06496b8f97a128a..3de246c8bff2b84b56eb33ad8fb59a7d3148f00f 100644 (file)
@@ -39,6 +39,7 @@ Application::Application()
 , up(false)
 , down(false) {
        GLContext::EnableVSync();
+       GLContext::EnableBackfaceCulling();
        program.LoadShader(
                GL_VERTEX_SHADER,
                "#version 330 core\n"
index 4772898fb364119cb53f469b32984c445bf0e722..40f76de50ef06eed4995f065013fd1a2a135c23d 100644 (file)
@@ -142,6 +142,10 @@ void GLContext::EnableVSync() {
        }
 }
 
+void GLContext::EnableBackfaceCulling() {
+       glEnable(GL_CULL_FACE);
+}
+
 
 InitGLEW::InitGLEW() {
        glewExperimental = GL_TRUE;
index a2f2de7779ec94ddb20d7a1664ab2ef2e873c0b5..51ab3f834b03054a2783b6838261fd0329d98fe4 100644 (file)
@@ -83,6 +83,7 @@ public:
        GLContext &operator =(const GLContext &) = delete;
 
        static void EnableVSync();
+       static void EnableBackfaceCulling();
 
 private:
        SDL_GLContext handle;