X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramdata.cpp;h=9a531be2fecefb28dfb38de3375b8dc00c7f6249;hp=b69d7b062dd61af65164f94b65fc6fc41cceb90b;hb=133fe7352831197c9ec59f923c1126651d80edcb;hpb=1b45b45f7d543ea677183bab5aaa9ff90b6576cf diff --git a/source/programdata.cpp b/source/programdata.cpp index b69d7b06..9a531be2 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -104,6 +104,11 @@ void ProgramData::uniform(const string &name, Uniform *uni) } } +void ProgramData::uniform(const string &name, const Uniform &u) +{ + uniform(name, u.clone()); +} + void ProgramData::uniform(const string &name, int v) { uniform(name, new Uniform1i(v)); @@ -295,6 +300,8 @@ unsigned ProgramData::compute_slot_mask(const Program::UniformBlockInfo &block) for(vector::const_iterator i=block.uniforms.begin(); i!=block.uniforms.end(); ++i) { SlotMap::const_iterator j = uniform_slots.find((*i)->name); + /* TODO issue a warning (or even error?) either here or in update_block + if all uniforms for a buffer-backed block are not found */ if(j!=uniform_slots.end() && j->secondsecond; }