Preliminary steps to adding update and event callbacks to StateSet, StateAttribute

and Uniform.
This commit is contained in:
Robert Osfield
2005-04-22 22:45:39 +00:00
parent c7fb7e8b5f
commit 819d2c6c56
7 changed files with 137 additions and 14 deletions

View File

@@ -39,6 +39,7 @@ COPY_OP( Image, DEEP_COPY_IMAGES );
COPY_OP( Array, DEEP_COPY_DRAWABLES );
COPY_OP( PrimitiveSet, DEEP_COPY_PRIMITIVES );
COPY_OP( Shape, DEEP_COPY_SHAPES );
COPY_OP( Uniform, DEEP_COPY_UNIFORMS );
Referenced* CopyOp::operator() (const Referenced* ref) const
{

View File

@@ -113,7 +113,6 @@ StateSet::StateSet(const StateSet& rhs,const CopyOp& copyop):Object(rhs,copyop)
}
}
#if 0 //[ TODO
// copy uniform values
for(UniformList::const_iterator rhs_uitr = rhs._uniformList.begin();
rhs_uitr != rhs._uniformList.end();
@@ -122,9 +121,8 @@ StateSet::StateSet(const StateSet& rhs,const CopyOp& copyop):Object(rhs,copyop)
const std::string& name = rhs_uitr->first;
const RefUniformPair& rup = rhs_uitr->second;
Uniform* uni = copyop(rup.first.get());
if( uni ) _uniformList[name] = RefUniformPair(uni, rup.second);
if (uni) _uniformList[name] = RefUniformPair(uni, rup.second);
}
#endif //]
_renderingHint = rhs._renderingHint;