예제 #1
0
 /// <summary>
 /// Set a uniform vec4 in the shader.
 /// Uses a cached float[] to reduce memory usage.
 /// </summary>
 /// <param name="location">The location of the uniform in the shader.</param>
 /// <param name="param">The Vector2f to load into the shader uniform.</param>
 public static void Uniform4(int location, Quaternion data)
 {
     vector4Float[0] = data.X;
     vector4Float[1] = data.Y;
     vector4Float[2] = data.Z;
     vector4Float[3] = data.W;
     GL.Uniform4fv(location, 1, vector4Float);
 }
예제 #2
0
 /// <summary>
 /// Set a uniform vec4 in the shader.
 /// Uses a cached float[] to reduce memory usage.
 /// </summary>
 /// <param name="location">The location of the uniform in the shader.</param>
 /// <param name="param">The Vector2f to load into the shader uniform.</param>
 public static void Uniform4(int location, Color4 data)
 {
     vector4Float[0] = data.R;
     vector4Float[1] = data.G;
     vector4Float[2] = data.B;
     vector4Float[3] = data.A;
     GL.Uniform4fv(location, 1, vector4Float);
 }