X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Funiform.cpp;h=b183719fe339debaf55402b35cb2eeda15bb3d8a;hp=8aba365be5e5cd2238a0934eb639d6585c453d8e;hb=49f1812b3e5ad73748015df52d0e4dee17246036;hpb=8f7d5b6460ef68e7316c7f556b7152d9c9f7bfe2 diff --git a/source/uniform.cpp b/source/uniform.cpp index 8aba365b..b183719f 100644 --- a/source/uniform.cpp +++ b/source/uniform.cpp @@ -1,4 +1,4 @@ -#include "arb_shader_objects.h" +#include #include "uniform.h" namespace Msp { @@ -17,18 +17,36 @@ void UniformScalar::apply(int index, unsigned size, const float *value) } +template<> +void UniformVector::apply(int index, unsigned size, const int *value) +{ + glUniform2iv(index, size, value); +} + template<> void UniformVector::apply(int index, unsigned size, const float *value) { glUniform2fv(index, size, value); } +template<> +void UniformVector::apply(int index, unsigned size, const int *value) +{ + glUniform3iv(index, size, value); +} + template<> void UniformVector::apply(int index, unsigned size, const float *value) { glUniform3fv(index, size, value); } +template<> +void UniformVector::apply(int index, unsigned size, const int *value) +{ + glUniform4iv(index, size, value); +} + template<> void UniformVector::apply(int index, unsigned size, const float *value) { @@ -45,7 +63,7 @@ void UniformMatrix::apply(int index, unsigned size, const float *va template<> void UniformMatrix::apply(int index, unsigned size, const float *value) { - glUniformMatrix2fv(index, size, false, value); + glUniformMatrix3fv(index, size, false, value); } template<>