summaryrefslogtreecommitdiff
path: root/retrace
diff options
context:
space:
mode:
Diffstat (limited to 'retrace')
-rw-r--r--retrace/daemon/glframe_state_override.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/retrace/daemon/glframe_state_override.cpp b/retrace/daemon/glframe_state_override.cpp
index 2dfe5077..ccc4b94a 100644
--- a/retrace/daemon/glframe_state_override.cpp
+++ b/retrace/daemon/glframe_state_override.cpp
@@ -168,19 +168,15 @@ StateOverride::enact_state(const KeyMap &m) const {
assert(GL::GetError() == GL_NO_ERROR);
break;
}
- case GL_BLEND_SRC: {
- GLint dst;
- GlFunctions::GetIntegerv(GL_BLEND_DST, &dst);
- assert(GL::GetError() == GL_NO_ERROR);
- GlFunctions::BlendFunc(i.second[0], dst);
- assert(GL::GetError() == GL_NO_ERROR);
- break;
- }
+ case GL_BLEND_SRC:
case GL_BLEND_DST: {
- GLint src;
- GlFunctions::GetIntegerv(GL_BLEND_DST, &src);
+ GLint src, dst;
+ GlFunctions::GetIntegerv(GL_BLEND_DST, &dst);
+ GlFunctions::GetIntegerv(GL_BLEND_SRC, &src);
assert(GL::GetError() == GL_NO_ERROR);
- GlFunctions::BlendFunc(src, i.second[0]);
+ GlFunctions::BlendFunc(
+ n == GL_BLEND_SRC ? i.second[0] : src,
+ n == GL_BLEND_DST ? i.second[0] : dst);
assert(GL::GetError() == GL_NO_ERROR);
break;
}