/// <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(Mat3x2 *pValue, Int32 count) { SetMatrixArrayValueInternal <Mat3x2>((IntPtr)pValue, count, (ptr, index) => Mat3x2.Transpose(ref ((Mat3x2 *)ptr)[index], out ((Mat2x3 *)ptr)[index]), (ptr, index) => Mat2x3.Transpose(ref ((Mat2x3 *)ptr)[index], out ((Mat3x2 *)ptr)[index]), (l, c, t, v) => gl.UniformMatrix3x2fv(l, c, t, (Single *)v)); }
public static void Multiply(ref Mat2x3 matrix1, ref Mat3x2 matrix2, out Mat2 result) { result.x.x = (matrix1.x.x * matrix2.x.x) + (matrix1.x.y * matrix2.y.x) + (matrix1.x.z * matrix2.z.x); result.x.y = (matrix1.x.x * matrix2.x.y) + (matrix1.x.y * matrix2.y.y) + (matrix1.x.z * matrix2.z.y); result.y.x = (matrix1.y.x * matrix2.x.x) + (matrix1.y.y * matrix2.y.x) + (matrix1.y.z * matrix2.z.x); result.y.y = (matrix1.y.x * matrix2.x.y) + (matrix1.y.y * matrix2.y.y) + (matrix1.y.z * matrix2.z.y); }
public static void Transpose(Mat2x3 matrix, out Mat3x2 result) { result.x.x = matrix.x.x; result.x.y = matrix.y.x; result.y.x = matrix.x.y; result.y.y = matrix.y.y; result.z.x = matrix.x.z; result.z.y = matrix.y.z; }
/// <summary> /// Sets the parameter's value. /// </summary> /// <param name="value">The value to set.</param> public void SetValue(Mat2x3 value) { var transpose = gl.IsMatrixTranspositionAvailable; if (transpose) { gl.UniformMatrix2x3fv(location, 1, true, (Single *)&value); gl.ThrowIfError(); } else { Mat2x3.Transpose(ref value, out var valueTransposed); gl.UniformMatrix2x3fv(location, 1, false, (Single *)&valueTransposed); gl.ThrowIfError(); } }
public override void Update(Mat2x3 matrix, ShaderVariableMapping variable) { throw new NotImplementedException(); }
public override void Update(Mat2x3 matrix, int offset) { throw new NotImplementedException(); }
public abstract void Update(Mat2x3 matrix, ShaderVariableMapping variable);
public abstract void Update(Mat2x3 matrix, int offset);
public override unsafe void Update(Mat2x3 matrix, ShaderVariableMapping variable) { Orbital_Video_D3D12_ConstantBuffer_Update(handle, &matrix, (uint)Marshal.SizeOf <Mat2x3>(), (uint)variable.offset, activeNodeIndex); }
public override unsafe void Update(Mat2x3 matrix, int offset) { Orbital_Video_D3D12_ConstantBuffer_Update(handle, &matrix, (uint)Marshal.SizeOf <Mat2x3>(), (uint)offset, activeNodeIndex); }