VERY experimental Nintendo Switch 2 emulator
C++
OpenGL: Add support for glFrontFace in the state tracker
Yuri Kunde Schlesner8e478d8b9912
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cppindex c44497fc32..a823729956 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 valuescull.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 testif (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.hindex 84b3d49bca..b8ab45bb8d 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_FACEGLenum mode; // GL_CULL_FACE_MODE+ GLenum front_face; // GL_FRONT_FACE} cull;struct {