From: Mikko Rasa Date: Wed, 9 May 2018 19:08:23 +0000 (+0300) Subject: Fix a bug in ProgramData when all uniforms in a block are removed X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6b0a93110454cc8d84d0d9b9b29fe9d0ecbaa4d5;p=libs%2Fgl.git Fix a bug in ProgramData when all uniforms in a block are removed Program blocks continued using the previously generated uniform blocks, but because the uniform values were removed the blocks were not updated anymore. --- diff --git a/source/programdata.cpp b/source/programdata.cpp index a0e0e8bc..79a8bb1b 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -455,7 +455,7 @@ ProgramData::ProgramBlock::ProgramBlock(): ProgramData::ProgramBlock::ProgramBlock(int p, SharedBlock *b): bind_point(p), - block(b ? b->block : 0), + block((b && b->used) ? b->block : 0), shared(b) { }