From cb8d51e37e7d630f1ea3dc816b2d5aaab2295bc2 Mon Sep 17 00:00:00 2001 From: Marcos Date: Mon, 26 Nov 2018 20:31:44 -0300 Subject: GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784) * GPU States: Implement Polygon Offset. This is used in SMO all the time. * Clang Format fixes. * Initialize polygon_offset in the constructor. --- src/video_core/renderer_opengl/gl_state.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 032fc43f0..0bf19ed07 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -176,6 +176,15 @@ public: float size; // GL_POINT_SIZE } point; + struct { + bool point_enable; + bool line_enable; + bool fill_enable; + GLfloat units; + GLfloat factor; + GLfloat clamp; + } polygon_offset; + std::array clip_distance; // GL_CLIP_DISTANCE OpenGLState(); @@ -226,6 +235,7 @@ private: void ApplyLogicOp() const; void ApplyTextures() const; void ApplySamplers() const; + void ApplyPolygonOffset() const; }; } // namespace OpenGL -- cgit v1.2.3