1 #include <msp/strings/format.h>
2 #include "animatedobject.h"
4 #include "programdata.h"
11 AnimatedObject::AnimatedObject(const Object &o):
15 if(const Technique *tech = object.get_technique())
16 if(tech->has_shaders())
17 shdata = new ProgramData;
20 void AnimatedObject::set_matrix(const Matrix &m)
25 void AnimatedObject::set_pose_matrix(unsigned link, const Matrix &m)
28 shdata->uniform_matrix4(format("pose[%d]", link), m);
31 void AnimatedObject::setup_render(Renderer &renderer, const Tag &) const
33 renderer.matrix_stack() *= matrix;
35 renderer.add_shader_data(shdata);