]> git.tdb.fi Git - libs/gl.git/blobdiff - source/keyframe.cpp
Make ambient occlusion edge detection threshold adjustable
[libs/gl.git] / source / keyframe.cpp
index 8eba17292368a33b576a0ae0186ee9388aacaa6b..f610de2d42afbd08dd118cf97e7f54afa75da7de 100644 (file)
@@ -24,6 +24,12 @@ void KeyFrame::set_matrix(const Matrix &m)
        transform = Transform::from_matrix(m);
 }
 
+void KeyFrame::set_uniform(const string &n, const AnimatedUniform &u)
+{
+       uniforms.erase(n);
+       uniforms.insert(UniformMap::value_type(n, u));
+}
+
 void KeyFrame::set_pose(const Pose &p)
 {
        pose = &p;
@@ -115,6 +121,12 @@ void KeyFrame::Loader::uniforms()
 KeyFrame::UniformsLoader::UniformsLoader(KeyFrame &k):
        DataFile::ObjectLoader<KeyFrame>(k)
 {
+       add("uniform", &UniformsLoader::uniform1f);
+       add("uniform", &UniformsLoader::uniform2f);
+       add("uniform", &UniformsLoader::uniform3f);
+       add("uniform", &UniformsLoader::uniform4f);
+
+       // Deprecated
        add("uniform1f", &UniformsLoader::uniform1f);
        add("uniform2f", &UniformsLoader::uniform2f);
        add("uniform3f", &UniformsLoader::uniform3f);