summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-02-26 23:05:09 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-02-27 17:07:36 +0200
commitf40c5b209b48b6dd1f8e345598104691ce6c932c (patch)
tree1597a8699e7b18d1499e6b8e29bd56395af79f12
parent39610cbfb381eec0b144f22cd1b34a4ff6911322 (diff)
#3597 Fix crash when RenderDebugGLSession is True
-rw-r--r--indra/llrender/llgl.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 1bc5e79835..1966e48f2e 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2458,12 +2458,15 @@ void LLGLState::checkStates(GLboolean writeAlpha)
return;
}
- GLint src;
- GLint dst;
- glGetIntegerv(GL_BLEND_SRC, &src);
- glGetIntegerv(GL_BLEND_DST, &dst);
- llassert_always(src == GL_SRC_ALPHA);
- llassert_always(dst == GL_ONE_MINUS_SRC_ALPHA);
+ GLint srcRGB, dstRGB, srcAlpha, dstAlpha;
+ glGetIntegerv(GL_BLEND_SRC_RGB, &srcRGB);
+ glGetIntegerv(GL_BLEND_DST_RGB, &dstRGB);
+ glGetIntegerv(GL_BLEND_SRC_ALPHA, &srcAlpha);
+ glGetIntegerv(GL_BLEND_DST_ALPHA, &dstAlpha);
+ llassert_always(srcRGB == GL_SRC_ALPHA);
+ llassert_always(srcAlpha == GL_SRC_ALPHA);
+ llassert_always(dstRGB == GL_ONE_MINUS_SRC_ALPHA);
+ llassert_always(dstAlpha == GL_ONE_MINUS_SRC_ALPHA);
// disable for now until usage is consistent
//GLboolean colorMask[4];