- for(vector<TaggedUniform>::iterator i=uniforms.begin(); i!=uniforms.end(); ++i)
- i->value = i->value->clone();
-}
-
-ProgramData::ProgramData(const ProgramData &other, const Program *p):
- tied_program(p),
- last_buffer_block(0),
- buffer(0),
- dirty(0)
-{
- if(tied_program)
- {
- for(vector<TaggedUniform>::const_iterator i=other.uniforms.begin(); i!=other.uniforms.end(); ++i)
- validate_tag(i->tag);
- }
-
- uniforms = other.uniforms;
- for(vector<TaggedUniform>::iterator i=uniforms.begin(); i!=uniforms.end(); ++i)
- i->value = i->value->clone();
-}
-
-ProgramData &ProgramData::operator=(const ProgramData &other)
-{
- tied_program = other.tied_program;
-
- uniforms = other.uniforms;
- for(vector<TaggedUniform>::iterator i=uniforms.begin(); i!=uniforms.end(); ++i)
- i->value = i->value->clone();
-
- for(vector<SharedBlock>::iterator i=blocks.begin(); i!=blocks.end(); ++i)
- delete i->block;
- programs.clear();
-
- last_buffer_block = 0;
- buffer = 0;
- dirty = 0;
-
- return *this;