mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 21:40:41 +00:00
Fix missing apply of blend state when indexed blending is not available
This commit is contained in:
@@ -1477,8 +1477,8 @@ void GLRenderState::ApplyState(WrappedOpenGL *gl)
|
||||
{
|
||||
for(GLuint i = 0; i < RDCMIN(maxDraws, (GLuint)ARRAY_COUNT(Blends)); i++)
|
||||
{
|
||||
if(Blends[i].EquationRGB ==
|
||||
eGL_NONE) // not set, possibly there were lesser draw buffers during capture
|
||||
// not set, possibly there were lesser draw buffers during capture
|
||||
if(Blends[i].EquationRGB == eGL_NONE)
|
||||
continue;
|
||||
|
||||
m_Real->glBlendFuncSeparatei(i, Blends[i].SourceRGB, Blends[i].DestinationRGB,
|
||||
@@ -1491,6 +1491,21 @@ void GLRenderState::ApplyState(WrappedOpenGL *gl)
|
||||
m_Real->glDisablei(eGL_BLEND, i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// not set, possibly there were lesser draw buffers during capture
|
||||
if(Blends[0].EquationRGB != eGL_NONE)
|
||||
{
|
||||
m_Real->glBlendFuncSeparate(Blends[0].SourceRGB, Blends[0].DestinationRGB,
|
||||
Blends[0].SourceAlpha, Blends[0].DestinationAlpha);
|
||||
m_Real->glBlendEquationSeparate(Blends[0].EquationRGB, Blends[0].EquationAlpha);
|
||||
|
||||
if(Blends[0].Enabled)
|
||||
m_Real->glEnable(eGL_BLEND);
|
||||
else
|
||||
m_Real->glDisable(eGL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
m_Real->glBlendColor(BlendColor[0], BlendColor[1], BlendColor[2], BlendColor[3]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user