i->second = i->second->clone();
}
+ProgramData &ProgramData::operator=(const ProgramData &other)
+{
+ for(UniformMap::iterator i=uniforms.begin(); i!=uniforms.end(); ++i)
+ delete i->second;
+ uniforms.clear();
+
+ for(UniformMap::const_iterator i=other.uniforms.begin(); i!=other.uniforms.end(); ++i)
+ uniforms.insert(uniforms.end(), UniformMap::value_type(i->first, i->second->clone()));
+
+ for(BlockMap::iterator i=blocks.begin(); i!=blocks.end(); ++i)
+ delete i->second.block;
+ blocks.clear();
+
+ changes = NO_CHANGES;
+
+ return *this;
+}
+
ProgramData::~ProgramData()
{
for(UniformMap::iterator i=uniforms.begin(); i!=uniforms.end(); ++i)
mutable Buffer *buffer;
mutable Changes changes;
- ProgramData &operator=(const ProgramData &);
public:
ProgramData();
ProgramData(const ProgramData &);
+ ProgramData &operator=(const ProgramData &);
~ProgramData();
private: