예제 #1
0
 /// <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));
 }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }
예제 #4
0
        /// <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();
            }
        }
예제 #5
0
 public override void Update(Mat2x3 matrix, ShaderVariableMapping variable)
 {
     throw new NotImplementedException();
 }
예제 #6
0
 public override void Update(Mat2x3 matrix, int offset)
 {
     throw new NotImplementedException();
 }
예제 #7
0
 public abstract void Update(Mat2x3 matrix, ShaderVariableMapping variable);
예제 #8
0
 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);
 }