private void addParam(string key, object obj) { switch (obj.GetType().Name) { case "Vec4": parameters[key] = new Vec4(); break; case "Sampler2D": parameters[key] = new Sampler2D(); break; case "Float": parameters[key] = new Float(); break; case "Int": parameters[key] = new Int(); break; } }
public void pass(string name, Vec4 vec) { int l = GL.GetUniformLocation(program, name); GL.Uniform4(l, vec.x, vec.y, vec.z, vec.w); l = 0; }