/// <summary> /// Sets the parameter's value. /// </summary> /// <param name="pValue">A pointer to the buffer that contains the value to set.</param> /// <param name="count">The number of elements in the array to set.</param> public void SetValue(Mat4x2 *pValue, Int32 count) { SetMatrixArrayValueInternal <Mat4x2>((IntPtr)pValue, count, (ptr, index) => Mat4x2.Transpose(ref ((Mat4x2 *)ptr)[index], out ((Mat2x4 *)ptr)[index]), (ptr, index) => Mat2x4.Transpose(ref ((Mat2x4 *)ptr)[index], out ((Mat4x2 *)ptr)[index]), (l, c, t, v) => gl.UniformMatrix4x2fv(l, c, t, (Single *)v)); }
/// <summary> /// Sets the parameter's value. /// </summary> /// <param name="value">The value to set.</param> public void SetValue(Mat4x2 value) { var transpose = gl.IsMatrixTranspositionAvailable; if (transpose) { gl.UniformMatrix4x2fv(location, 1, true, (Single *)&value); gl.ThrowIfError(); } else { Mat4x2.Transpose(ref value, out var valueTransposed); gl.UniformMatrix4x2fv(location, 1, false, (Single *)&valueTransposed); gl.ThrowIfError(); } }