2 #include "arb_shader_objects.h"
8 Uniform1i::Uniform1i(int v_):
12 void Uniform1i::apply(int index) const
14 glUniform1iARB(index, v);
17 Uniform1i *Uniform1i::clone() const
19 return new Uniform1i(v);
23 Uniform1f::Uniform1f(float v_):
27 void Uniform1f::apply(int index) const
29 glUniform1fARB(index, v);
32 Uniform1f *Uniform1f::clone() const
34 return new Uniform1f(v);
38 Uniform2f::Uniform2f(float v0, float v1)
44 void Uniform2f::apply(int index) const
46 glUniform2fvARB(index, 1, v);
49 Uniform2f *Uniform2f::clone() const
51 return new Uniform2f(v[0], v[1]);
55 Uniform3f::Uniform3f(float v0, float v1, float v2)
62 void Uniform3f::apply(int index) const
64 glUniform3fvARB(index, 1, v);
67 Uniform3f *Uniform3f::clone() const
69 return new Uniform3f(v[0], v[1], v[2]);
73 Uniform4f::Uniform4f(float v0, float v1, float v2, float v3)
81 void Uniform4f::apply(int index) const
83 glUniform4fvARB(index, 1, v);
86 Uniform4f *Uniform4f::clone() const
88 return new Uniform4f(v[0], v[1], v[2], v[3]);
92 UniformMatrix4x4f::UniformMatrix4x4f(const float *vp)
94 std::copy(vp, vp+16, v);
97 void UniformMatrix4x4f::apply(int index) const
99 glUniformMatrix4fvARB(index, 1, false, v);
102 UniformMatrix4x4f *UniformMatrix4x4f::clone() const
104 return new UniformMatrix4x4f(v);