diff options
| author | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2018-11-13 20:13:16 -0300 |
|---|---|---|
| committer | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2018-11-17 19:59:32 -0300 |
| commit | 1881e86c434edfc17f78f68f07443bef1120cda1 (patch) | |
| tree | 3694a8acdc510e4d17e124b0c4285c99c14ccfd4 /src/video_core/renderer_opengl/gl_state.h | |
| parent | a819116154f171e32e8b67a4d4b7b881885af878 (diff) | |
fix viewport and scissor behavior
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 22 |
1 files changed, 12 insertions, 10 deletions
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 @@ -40,6 +40,10 @@ public: } 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 GLenum front_face; // GL_FRONT_FACE @@ -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<viewport, Tegra::Engines::Maxwell3D::Regs::NumRenderTargets> viewports; - - struct { - bool enabled; // GL_SCISSOR_TEST - GLint x; - GLint y; - GLsizei width; - GLsizei height; - } scissor; + std::array<viewport, Tegra::Engines::Maxwell3D::Regs::NumViewports> 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 |
