summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-31 17:03:21 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-12-05 06:58:26 +0100
commit95dbc6eb0ecb945ed6669d5d58db5eb23d86beac (patch)
tree79b8fb27fe66e80c4428ff6051b1dbb7ba756bbb
parentMerge pull request #1252 from Subv/cam (diff)
downloadyuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.tar
yuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.tar.gz
yuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.tar.bz2
yuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.tar.lz
yuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.tar.xz
yuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.tar.zst
yuzu-95dbc6eb0ecb945ed6669d5d58db5eb23d86beac.zip
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp5
-rw-r--r--src/video_core/renderer_opengl/gl_state.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index c44497fc3..a82372995 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -11,6 +11,7 @@ OpenGLState::OpenGLState() {
// These all match default OpenGL values
cull.enabled = false;
cull.mode = GL_BACK;
+ cull.front_face = GL_CCW;
depth.test_enabled = false;
depth.test_func = GL_LESS;
@@ -67,6 +68,10 @@ void OpenGLState::Apply() {
glCullFace(cull.mode);
}
+ if (cull.front_face != cur_state.cull.front_face) {
+ glFrontFace(cull.front_face);
+ }
+
// Depth test
if (depth.test_enabled != cur_state.depth.test_enabled) {
if (depth.test_enabled) {
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index 84b3d49bc..b8ab45bb8 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -11,6 +11,7 @@ public:
struct {
bool enabled; // GL_CULL_FACE
GLenum mode; // GL_CULL_FACE_MODE
+ GLenum front_face; // GL_FRONT_FACE
} cull;
struct {