diff options
| author | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2018-11-13 22:09:01 -0300 |
|---|---|---|
| committer | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2018-11-17 19:59:33 -0300 |
| commit | 8ed7e1af2c8d859ca5e1bd05e199b1f14099c8b4 (patch) | |
| tree | f0903ff885f49b0ccecf3d4023fdd47e067bf072 /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | 02c22a3440cbb9d264a1d260a93601f5b893c64c (diff) | |
add support for fragment_color_clamp
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index dd6d946e5..6998dd92b 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -89,6 +89,7 @@ OpenGLState::OpenGLState() { clip_distance = {}; point.size = 1; + fragment_color_clamp.enabled = false; } void OpenGLState::ApplyDefaultState() { @@ -497,6 +498,12 @@ void OpenGLState::Apply() const { if (point.size != cur_state.point.size) { glPointSize(point.size); } + if (GLAD_GL_ARB_color_buffer_float) { + if (fragment_color_clamp.enabled != cur_state.fragment_color_clamp.enabled) { + glClampColor(GL_CLAMP_FRAGMENT_COLOR_ARB, + fragment_color_clamp.enabled ? GL_TRUE : GL_FALSE); + } + } ApplyColorMask(); ApplyViewport(); ApplyStencilTest(); |
