X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramdata.cpp;h=7334596c0d4873cfb550b995e5791d8b5236cd2d;hb=904de4f7fd994886adbd3a6c03bc1b7c14ebc562;hp=b8a272c0fc0bde8a3699a81e347115327c41938f;hpb=3cdcc7f689b3868dd275774b9bd9adb5c436f244;p=libs%2Fgl.git diff --git a/source/programdata.cpp b/source/programdata.cpp index b8a272c0..7334596c 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -46,6 +46,9 @@ void ProgramData::uniform(const string &name, Uniform *uni) UniformMap::iterator i = uniforms.find(name); if(i!=uniforms.end()) { + /* UniformBlock does not copy the uniforms, so existing blocks will be + left with stale pointers. This is not a problem as long as no one stores + pointers to the blocks and expects them to stay valid. */ delete i->second; i->second = uni; changes = VALUES_CHANGED;