From 1881e86c434edfc17f78f68f07443bef1120cda1 Mon Sep 17 00:00:00 2001 From: Rodolfo Bogado Date: Tue, 13 Nov 2018 20:13:16 -0300 Subject: fix viewport and scissor behavior --- src/video_core/renderer_opengl/gl_state.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_state.h') diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index e5d1baae6..da487461f 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -39,6 +39,10 @@ public: bool enabled; // GL_FRAMEBUFFER_SRGB } framebuffer_srgb; + struct { + bool enabled; // viewports arrays are only supported when geometry shaders are enabled. + } geometry_shaders; + struct { bool enabled; // GL_CULL_FACE GLenum mode; // GL_CULL_FACE_MODE @@ -150,16 +154,15 @@ public: GLfloat height; GLfloat depth_range_near; // GL_DEPTH_RANGE GLfloat depth_range_far; // GL_DEPTH_RANGE + struct { + bool enabled; // GL_SCISSOR_TEST + GLint x; + GLint y; + GLsizei width; + GLsizei height; + } scissor; }; - std::array viewports; - - struct { - bool enabled; // GL_SCISSOR_TEST - GLint x; - GLint y; - GLsizei width; - GLsizei height; - } scissor; + std::array viewports; struct { float size; // GL_POINT_SIZE @@ -214,7 +217,6 @@ private: void ApplyLogicOp() const; void ApplyTextures() const; void ApplySamplers() const; - void ApplyScissor() const; }; } // namespace OpenGL -- cgit v1.2.3