diff options
author | Mark Janes <mark.a.janes@intel.com> | 2017-11-28 13:40:59 -0800 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-11-28 13:40:59 -0800 |
commit | fd2afa85fe612ae46b65b849ba37916cac381bb5 (patch) | |
tree | 97e6f07a3fa5451959983b89cac8cd1d31ef9d64 /retrace | |
parent | 8e3321af68d7ac21a3a6b4da3be9ce78a7496636 (diff) |
State: Enable GL_DITHER
Diffstat (limited to 'retrace')
-rw-r--r-- | retrace/daemon/glframe_state_enums.cpp | 8 | ||||
-rw-r--r-- | retrace/daemon/glframe_state_override.cpp | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/retrace/daemon/glframe_state_enums.cpp b/retrace/daemon/glframe_state_enums.cpp index 9b4b57c6..7388bcd8 100644 --- a/retrace/daemon/glframe_state_enums.cpp +++ b/retrace/daemon/glframe_state_enums.cpp @@ -60,6 +60,7 @@ glretrace::state_name_to_enum(const std::string &value) { {"GL_DEPTH_RANGE", GL_DEPTH_RANGE}, {"GL_DEPTH_TEST", GL_DEPTH_TEST}, {"GL_DEPTH_WRITEMASK", GL_DEPTH_WRITEMASK}, + {"GL_DITHER", GL_DITHER}, {"GL_DST_ALPHA", GL_DST_ALPHA}, {"GL_DST_COLOR", GL_DST_COLOR}, {"GL_EQUAL", GL_EQUAL}, @@ -125,6 +126,7 @@ glretrace::state_enum_to_name(GLint value) { {GL_DEPTH_RANGE, "GL_DEPTH_RANGE"}, {GL_DEPTH_TEST, "GL_DEPTH_TEST"}, {GL_DEPTH_WRITEMASK, "GL_DEPTH_WRITEMASK"}, + {GL_DITHER, "GL_DITHER"}, {GL_DST_ALPHA, "GL_DST_ALPHA"}, {GL_DST_COLOR, "GL_DST_COLOR"}, {GL_EQUAL, "GL_EQUAL"}, @@ -171,6 +173,7 @@ glretrace::state_name_to_choices(const std::string &n) { case GL_CULL_FACE: case GL_DEPTH_TEST: case GL_DEPTH_WRITEMASK: + case GL_DITHER: case GL_LINE_SMOOTH: return {"true", "false"}; case GL_BLEND_DST: @@ -225,7 +228,12 @@ glretrace::state_name_to_indices(const std::string &n) { return {"Red", "Green", "Blue", "Alpha"}; case GL_DEPTH_RANGE: return {"Near", "Far"}; + case GL_BLEND: + case GL_CULL_FACE: + case GL_DEPTH_TEST: case GL_DEPTH_WRITEMASK: + case GL_DITHER: + case GL_LINE_SMOOTH: return {"Enabled"}; default: return {}; diff --git a/retrace/daemon/glframe_state_override.cpp b/retrace/daemon/glframe_state_override.cpp index cf5d4289..976461e5 100644 --- a/retrace/daemon/glframe_state_override.cpp +++ b/retrace/daemon/glframe_state_override.cpp @@ -107,6 +107,7 @@ StateOverride::interpret_value(const StateKey &item, case GL_DEPTH_FUNC: case GL_DEPTH_TEST: case GL_DEPTH_WRITEMASK: + case GL_DITHER: return state_name_to_enum(value); // float values @@ -136,6 +137,7 @@ StateOverride::getState(const StateKey &item, case GL_BLEND: case GL_CULL_FACE: case GL_DEPTH_TEST: + case GL_DITHER: case GL_LINE_SMOOTH: { data->resize(1); get_enabled_state(n, data); @@ -248,6 +250,7 @@ StateOverride::enact_state(const KeyMap &m) const { case GL_BLEND: case GL_CULL_FACE: case GL_DEPTH_TEST: + case GL_DITHER: case GL_LINE_SMOOTH: { enact_enabled_state(n, i.second[0]); break; @@ -527,4 +530,10 @@ StateOverride::onState(SelectionId selId, callback->onState(selId, experimentCount, renderId, k, {data[0] ? "true" : "false"}); } + { + StateKey k("Dithering State", "GL_DITHER"); + getState(k, &data); + callback->onState(selId, experimentCount, renderId, k, + {data[0] ? "true" : "false"}); + } } |