X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fanimatedobject.cpp;h=390b90b869ce6acc9eb5a5a93a6fbe701776429e;hp=d2157fd1bc128ebc6dd676ef0cc10c54b9204e5c;hb=81e0e39fefd8f50ae2367fe821d58af6273bcea2;hpb=00d926c3fe134820139a925cfac28cd64729db93 diff --git a/source/animatedobject.cpp b/source/animatedobject.cpp index d2157fd1..390b90b8 100644 --- a/source/animatedobject.cpp +++ b/source/animatedobject.cpp @@ -37,6 +37,20 @@ void AnimatedObject::set_pose_matrix(unsigned link, const Matrix &m) } } +ProgramData &AnimatedObject::get_shader_data() +{ + if(!shdata) + throw invalid_operation("AnimatedObject::get_shader_data"); + return *shdata; +} + +const ProgramData &AnimatedObject::get_shader_data() const +{ + if(!shdata) + throw invalid_operation("AnimatedObject::get_shader_data"); + return *shdata; +} + void AnimatedObject::set_uniform(const string &name, const KeyFrame::AnimatedUniform &uni) { if(!shdata) @@ -63,8 +77,9 @@ void AnimatedObject::setup_render(Renderer &renderer, const Tag &) const AnimatedObject::Loader::Loader(AnimatedObject &o): - DataFile::ObjectLoader(o) + DataFile::DerivedObjectLoader(o) { + // Deprecated; Use the transform statement defined in ObjectInstance instead add("position", &Loader::position); add("rotation", &Loader::rotation); add("scale", &Loader::scale);