GL: Fixed constants commit.

This commit is contained in:
Branimir Karadzic 2014-10-08 19:58:29 -07:00
parent 51d8daf762
commit f5b8d636a6

View file

@ -4108,7 +4108,8 @@ namespace bgfx
bool constantsChanged = compute.m_constBegin < compute.m_constEnd; bool constantsChanged = compute.m_constBegin < compute.m_constEnd;
rendererUpdateUniforms(this, _render->m_constantBuffer, compute.m_constBegin, compute.m_constEnd); rendererUpdateUniforms(this, _render->m_constantBuffer, compute.m_constBegin, compute.m_constEnd);
if (constantsChanged) if (constantsChanged
&& NULL != program.m_constantBuffer)
{ {
commit(*program.m_constantBuffer); commit(*program.m_constantBuffer);
} }
@ -4423,7 +4424,8 @@ namespace bgfx
{ {
ProgramGL& program = m_program[programIdx]; ProgramGL& program = m_program[programIdx];
if (constantsChanged) if (constantsChanged
&& NULL != program.m_constantBuffer)
{ {
commit(*program.m_constantBuffer); commit(*program.m_constantBuffer);
} }