Skip to content

Commit f40c5b2

Browse files
committed
#3597 Fix crash when RenderDebugGLSession is True
1 parent 39610cb commit f40c5b2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

indra/llrender/llgl.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,12 +2458,15 @@ void LLGLState::checkStates(GLboolean writeAlpha)
24582458
return;
24592459
}
24602460

2461-
GLint src;
2462-
GLint dst;
2463-
glGetIntegerv(GL_BLEND_SRC, &src);
2464-
glGetIntegerv(GL_BLEND_DST, &dst);
2465-
llassert_always(src == GL_SRC_ALPHA);
2466-
llassert_always(dst == GL_ONE_MINUS_SRC_ALPHA);
2461+
GLint srcRGB, dstRGB, srcAlpha, dstAlpha;
2462+
glGetIntegerv(GL_BLEND_SRC_RGB, &srcRGB);
2463+
glGetIntegerv(GL_BLEND_DST_RGB, &dstRGB);
2464+
glGetIntegerv(GL_BLEND_SRC_ALPHA, &srcAlpha);
2465+
glGetIntegerv(GL_BLEND_DST_ALPHA, &dstAlpha);
2466+
llassert_always(srcRGB == GL_SRC_ALPHA);
2467+
llassert_always(srcAlpha == GL_SRC_ALPHA);
2468+
llassert_always(dstRGB == GL_ONE_MINUS_SRC_ALPHA);
2469+
llassert_always(dstAlpha == GL_ONE_MINUS_SRC_ALPHA);
24672470

24682471
// disable for now until usage is consistent
24692472
//GLboolean colorMask[4];

0 commit comments

Comments
 (0)