diff_loc = sprog->get_uniform_location("diffuse");
spec_loc = sprog->get_uniform_location("specular");
shin_loc = sprog->get_uniform_location("shininess");
+ t_loc = sprog->get_uniform_location("t");
/* uniform locations for matrices */
for(size_t i=0; i<scene->objects.size(); i++) {
draw_object(scene->objects[i]);
}
+}
+
+void MorphRenderer::draw_object(Object *object) const
+{
+ float t = (sin(time_sec) + 1) * 0.5;
+
+ if(t_loc != -1)
+ sprog->set_uniformf(t_loc, t);
+
+ Renderer::draw_object(object);
}
\ No newline at end of file