From f5b8d636a616abc08af82eea2b615c6207379cd3 Mon Sep 17 00:00:00 2001 From: Branimir Karadzic Date: Wed, 8 Oct 2014 19:58:29 -0700 Subject: [PATCH] GL: Fixed constants commit. --- src/renderer_gl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 39624436f..aadb085f1 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -4108,7 +4108,8 @@ namespace bgfx bool constantsChanged = 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); } @@ -4423,7 +4424,8 @@ namespace bgfx { ProgramGL& program = m_program[programIdx]; - if (constantsChanged) + if (constantsChanged + && NULL != program.m_constantBuffer) { commit(*program.m_constantBuffer); }