]> git.tdb.fi Git - libs/gl.git/blobdiff - source/uniform.cpp
Use bezier splines in Animation
[libs/gl.git] / source / uniform.cpp
index 09450a9a0962f991805ae0d7ba35698ff031f515..b183719fe339debaf55402b35cb2eeda15bb3d8a 100644 (file)
@@ -1,4 +1,4 @@
-#include "arb_shader_objects.h"
+#include <msp/gl/extensions/arb_shader_objects.h>
 #include "uniform.h"
 
 namespace Msp {
@@ -17,18 +17,36 @@ void UniformScalar<float>::apply(int index, unsigned size, const float *value)
 }
 
 
+template<>
+void UniformVector<int, 2>::apply(int index, unsigned size, const int *value)
+{
+       glUniform2iv(index, size, value);
+}
+
 template<>
 void UniformVector<float, 2>::apply(int index, unsigned size, const float *value)
 {
        glUniform2fv(index, size, value);
 }
 
+template<>
+void UniformVector<int, 3>::apply(int index, unsigned size, const int *value)
+{
+       glUniform3iv(index, size, value);
+}
+
 template<>
 void UniformVector<float, 3>::apply(int index, unsigned size, const float *value)
 {
        glUniform3fv(index, size, value);
 }
 
+template<>
+void UniformVector<int, 4>::apply(int index, unsigned size, const int *value)
+{
+       glUniform4iv(index, size, value);
+}
+
 template<>
 void UniformVector<float, 4>::apply(int index, unsigned size, const float *value)
 {
@@ -36,6 +54,18 @@ void UniformVector<float, 4>::apply(int index, unsigned size, const float *value
 }
 
 
+template<>
+void UniformMatrix<float, 2, 2>::apply(int index, unsigned size, const float *value)
+{
+       glUniformMatrix2fv(index, size, false, value);
+}
+
+template<>
+void UniformMatrix<float, 3, 3>::apply(int index, unsigned size, const float *value)
+{
+       glUniformMatrix3fv(index, size, false, value);
+}
+
 template<>
 void UniformMatrix<float, 4, 4>::apply(int index, unsigned size, const float *value)
 {