3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include "arb_shader_objects.h"
14 Uniform1i::Uniform1i(int v_):
18 void Uniform1i::apply(int index) const
20 glUniform1iARB(index, v);
23 Uniform1i *Uniform1i::clone() const
25 return new Uniform1i(v);
29 Uniform1f::Uniform1f(float v_):
33 void Uniform1f::apply(int index) const
35 glUniform1fARB(index, v);
38 Uniform1f *Uniform1f::clone() const
40 return new Uniform1f(v);
44 Uniform2f::Uniform2f(float v0, float v1)
50 void Uniform2f::apply(int index) const
52 glUniform2fvARB(index, 1, v);
55 Uniform2f *Uniform2f::clone() const
57 return new Uniform2f(v[0], v[1]);
61 Uniform3f::Uniform3f(float v0, float v1, float v2)
68 void Uniform3f::apply(int index) const
70 glUniform3fvARB(index, 1, v);
73 Uniform3f *Uniform3f::clone() const
75 return new Uniform3f(v[0], v[1], v[2]);
79 Uniform4f::Uniform4f(float v0, float v1, float v2, float v3)
87 void Uniform4f::apply(int index) const
89 glUniform4fvARB(index, 1, v);
92 Uniform4f *Uniform4f::clone() const
94 return new Uniform4f(v[0], v[1], v[2], v[3]);