public void SetUniform(UniformName uniform, Vector2f[] value)
        {
            float[] conv = new float[value.Length * 2];
            int     cv   = 0;

            for (int i = 0; i < conv.Length; i += 2)
            {
                conv[i]     = value[cv].X;
                conv[i + 1] = value[cv].Y;
                cv++;
            }
            RenderDevice_SetUniform(Handle, uniform, conv, value.Length, sizeof(float) * conv.Length);
        }
 static extern void RenderDevice_SetUniform(IntPtr handle, UniformName name, ref Matrix data, int count, int bytesize);
 static extern void RenderDevice_DeclareUniform(IntPtr handle, UniformName name, string variablename, UniformType type);
 public void SetUniform(UniformName uniform, Vector4i value)
 {
     RenderDevice_SetUniform(Handle, uniform, new int[] { value.X, value.Y, value.Z, value.W }, 1, sizeof(int) * 4);
 }
 public void SetUniform(UniformName uniform, ref Matrix matrix)
 {
     RenderDevice_SetUniform(Handle, uniform, ref matrix, 1, sizeof(float) * 16);
 }
 public void SetUniform(UniformName uniform, int value)
 {
     RenderDevice_SetUniform(Handle, uniform, new int[] { value }, 1, sizeof(int));
 }
 public void SetUniform(UniformName uniform, Color4 value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value.Red, value.Green, value.Blue, value.Alpha }, 1, sizeof(float) * 4);
 }
 public void SetUniform(UniformName uniform, Vector3f value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value.X, value.Y, value.Z }, 1, sizeof(float) * 3);
 }
 public void SetUniform(UniformName uniform, float value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value }, 1, sizeof(float));
 }
 public void SetUniform(UniformName uniform, bool value)
 {
     RenderDevice_SetUniform(Handle, uniform, new float[] { value ? 1.0f : 0.0f }, 1, sizeof(float));
 }
 public void DeclareUniform(UniformName name, string variablename, UniformType type)
 {
     RenderDevice_DeclareUniform(Handle, name, variablename, type);
 }