public void SetValue(Matrix4 param) { if (Type != typeof(Matrix4)) throw new Exception(string.Format("SetValue({0}) was given a Matrix4.", Type)); Gl.UniformMatrix4fv(location, 1, false, param.ToFloat()); }
public void MatrixToFloat() { float[] array = new float[] { 10, 20, 30, 40, 50, 10, 20, 30, 40, 50, 10, 20, 30, 40, 50, 10 }; Matrix4 matrix = new Matrix4(array); float[] comparison = matrix.ToFloat(); Assert.AreEqual(comparison.Length, array.Length); for (int i = 0; i < array.Length; i++) Assert.AreEqual(comparison[i], array[i]); }