diff options
author | Mark Janes <mark.a.janes@intel.com> | 2017-10-31 15:43:13 -0700 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-11-27 11:29:20 -0800 |
commit | 17607c0606276324ee597b3a5303fde51944d495 (patch) | |
tree | a101d12c0dbe9a3c8ff7194be6a77362d2afe0ed /retrace | |
parent | a2a2c2872533685f0878584a61813bc795f60f2a (diff) |
State: Handle GL_LINE_SMOOTH
Diffstat (limited to 'retrace')
-rw-r--r-- | retrace/daemon/glframe_state_enums.cpp | 2 | ||||
-rw-r--r-- | retrace/daemon/glframe_state_override.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/retrace/daemon/glframe_state_enums.cpp b/retrace/daemon/glframe_state_enums.cpp index a40ec2f8..fbae56bc 100644 --- a/retrace/daemon/glframe_state_enums.cpp +++ b/retrace/daemon/glframe_state_enums.cpp @@ -59,6 +59,7 @@ glretrace::state_name_to_enum(const std::string &value) { {"GL_ONE_MINUS_CONSTANT_ALPHA", GL_ONE_MINUS_CONSTANT_ALPHA}, {"GL_BLEND_COLOR", GL_BLEND_COLOR}, {"GL_LINE_WIDTH", GL_LINE_WIDTH}, + {"GL_LINE_SMOOTH", GL_LINE_SMOOTH}, {"true", 1}, {"false", 0} }; @@ -126,6 +127,7 @@ glretrace::state_name_to_choices(const std::string &n) { switch (state_name_to_enum(n)) { case GL_CULL_FACE: case GL_BLEND: + case GL_LINE_SMOOTH: return {"true", "false"}; case GL_CULL_FACE_MODE: return {"GL_FRONT", "GL_BACK", "GL_FRONT_AND_BACK"}; diff --git a/retrace/daemon/glframe_state_override.cpp b/retrace/daemon/glframe_state_override.cpp index 42e70e4d..003c2713 100644 --- a/retrace/daemon/glframe_state_override.cpp +++ b/retrace/daemon/glframe_state_override.cpp @@ -75,6 +75,7 @@ StateOverride::getState(const StateKey &item, const auto n = state_name_to_enum(item.name); switch (n) { case GL_CULL_FACE: + case GL_LINE_SMOOTH: case GL_BLEND: { get_enabled_state(n, data); break; @@ -153,7 +154,8 @@ StateOverride::enact_state(const KeyMap &m) const { const auto n = state_name_to_enum(i.first.name); switch (n) { case GL_CULL_FACE: - case GL_BLEND: { + case GL_BLEND: + case GL_LINE_SMOOTH: { enact_enabled_state(n, i.second[0]); break; } @@ -272,4 +274,10 @@ StateOverride::onState(SelectionId selId, floatString(data[0], &value); callback->onState(selId, experimentCount, renderId, k, {value}); } + { + StateKey k("Rendering", "Line State", "GL_LINE_SMOOTH"); + getState(k, &data); + callback->onState(selId, experimentCount, renderId, + k, {data[0] ? "true" : "false"}); + } } |