summaryrefslogtreecommitdiff
path: root/retrace
diff options
context:
space:
mode:
authorMark Janes <mark.a.janes@intel.com>2017-11-28 11:49:08 -0800
committerMark Janes <mark.a.janes@intel.com>2017-11-28 11:49:08 -0800
commit796acaa477fa2014e3772c7477149ae173e8dec5 (patch)
tree4a2c6651593250c43d3261cc21ea8ccb03392815 /retrace
parent981fb3f9381daf21db920f2ead16107b3b3de4f6 (diff)
State: Enable GL_DEPTH_TEST
Diffstat (limited to 'retrace')
-rw-r--r--retrace/daemon/glframe_state_enums.cpp3
-rw-r--r--retrace/daemon/glframe_state_override.cpp9
2 files changed, 12 insertions, 0 deletions
diff --git a/retrace/daemon/glframe_state_enums.cpp b/retrace/daemon/glframe_state_enums.cpp
index 32f0da5b..3333270f 100644
--- a/retrace/daemon/glframe_state_enums.cpp
+++ b/retrace/daemon/glframe_state_enums.cpp
@@ -58,6 +58,7 @@ glretrace::state_name_to_enum(const std::string &value) {
{"GL_DEPTH_CLEAR_VALUE", GL_DEPTH_CLEAR_VALUE},
{"GL_DEPTH_FUNC", GL_DEPTH_FUNC},
{"GL_DEPTH_RANGE", GL_DEPTH_RANGE},
+ {"GL_DEPTH_TEST", GL_DEPTH_TEST},
{"GL_DST_ALPHA", GL_DST_ALPHA},
{"GL_DST_COLOR", GL_DST_COLOR},
{"GL_EQUAL", GL_EQUAL},
@@ -121,6 +122,7 @@ glretrace::state_enum_to_name(GLint value) {
{GL_DEPTH_CLEAR_VALUE, "GL_DEPTH_CLEAR_VALUE"},
{GL_DEPTH_FUNC, "GL_DEPTH_FUNC"},
{GL_DEPTH_RANGE, "GL_DEPTH_RANGE"},
+ {GL_DEPTH_TEST, "GL_DEPTH_TEST"},
{GL_DST_ALPHA, "GL_DST_ALPHA"},
{GL_DST_COLOR, "GL_DST_COLOR"},
{GL_EQUAL, "GL_EQUAL"},
@@ -165,6 +167,7 @@ glretrace::state_name_to_choices(const std::string &n) {
case GL_BLEND:
case GL_COLOR_WRITEMASK:
case GL_CULL_FACE:
+ case GL_DEPTH_TEST:
case GL_LINE_SMOOTH:
return {"true", "false"};
case GL_BLEND_DST:
diff --git a/retrace/daemon/glframe_state_override.cpp b/retrace/daemon/glframe_state_override.cpp
index d70203a3..55fc5658 100644
--- a/retrace/daemon/glframe_state_override.cpp
+++ b/retrace/daemon/glframe_state_override.cpp
@@ -105,6 +105,7 @@ StateOverride::interpret_value(const StateKey &item,
case GL_CULL_FACE_MODE:
case GL_LINE_SMOOTH:
case GL_DEPTH_FUNC:
+ case GL_DEPTH_TEST:
return state_name_to_enum(value);
// float values
@@ -133,6 +134,7 @@ StateOverride::getState(const StateKey &item,
switch (n) {
case GL_BLEND:
case GL_CULL_FACE:
+ case GL_DEPTH_TEST:
case GL_LINE_SMOOTH: {
data->resize(1);
get_enabled_state(n, data);
@@ -243,6 +245,7 @@ StateOverride::enact_state(const KeyMap &m) const {
switch (n) {
case GL_BLEND:
case GL_CULL_FACE:
+ case GL_DEPTH_TEST:
case GL_LINE_SMOOTH: {
enact_enabled_state(n, i.second[0]);
break;
@@ -505,4 +508,10 @@ StateOverride::onState(SelectionId selId,
callback->onState(selId, experimentCount, renderId,
k, range);
}
+ {
+ StateKey k("Depth State", "GL_DEPTH_TEST");
+ getState(k, &data);
+ callback->onState(selId, experimentCount, renderId,
+ k, {data[0] ? "true" : "false"});
+ }
}