mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-08-04 07:01:12 +00:00
Added UniformMatrix3/3d/4d overloads
This commit is contained in:
parent
56e75748b5
commit
e6a855f00a
|
@ -137,6 +137,17 @@ namespace OpenTK.Graphics.ES20
|
||||||
GL.Uniform4(location, quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
|
GL.Uniform4(location, quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void UniformMatrix3(int location, bool transpose, ref Matrix3 matrix)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (float* matrix_ptr = &matrix.Row0.X)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix3(location, 1, transpose, matrix_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void UniformMatrix4(int location, bool transpose, ref Matrix4 matrix)
|
public static void UniformMatrix4(int location, bool transpose, ref Matrix4 matrix)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
|
|
@ -300,17 +300,6 @@ namespace OpenTK.Graphics.OpenGL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UniformMatrix4(int location, bool transpose, ref Matrix4 matrix)
|
|
||||||
{
|
|
||||||
unsafe
|
|
||||||
{
|
|
||||||
fixed (float* matrix_ptr = &matrix.Row0.X)
|
|
||||||
{
|
|
||||||
GL.UniformMatrix4(location, 1, transpose, matrix_ptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Normal3(Vector3d normal)
|
public static void Normal3(Vector3d normal)
|
||||||
{
|
{
|
||||||
GL.Normal3(normal.X, normal.Y, normal.Z);
|
GL.Normal3(normal.X, normal.Y, normal.Z);
|
||||||
|
@ -465,6 +454,50 @@ namespace OpenTK.Graphics.OpenGL
|
||||||
GL.Uniform4(location, quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
|
GL.Uniform4(location, quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void UniformMatrix3(int location, bool transpose, ref Matrix3 matrix)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (float* matrix_ptr = &matrix.Row0.X)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix3(location, 1, transpose, matrix_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UniformMatrix3(int location, bool transpose, ref Matrix3d matrix)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (double* matrix_ptr = &matrix.Row0.X)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix3(location, 1, transpose, matrix_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UniformMatrix4(int location, bool transpose, ref Matrix4 matrix)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (float* matrix_ptr = &matrix.Row0.X)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix4(location, 1, transpose, matrix_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UniformMatrix4(int location, bool transpose, ref Matrix4d matrix)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
fixed (double* matrix_ptr = &matrix.Row0.X)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix4(location, 1, transpose, matrix_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
<Compile Include="Input\IInputDriver2.cs" />
|
<Compile Include="Input\IInputDriver2.cs" />
|
||||||
<Compile Include="Input\IKeyboardDriver2.cs" />
|
<Compile Include="Input\IKeyboardDriver2.cs" />
|
||||||
<Compile Include="Input\IMouseDriver2.cs" />
|
<Compile Include="Input\IMouseDriver2.cs" />
|
||||||
|
<Compile Include="Math\Matrix3.cs" />
|
||||||
<Compile Include="Platform\DisplayDeviceBase.cs" />
|
<Compile Include="Platform\DisplayDeviceBase.cs" />
|
||||||
<Compile Include="Platform\Windows\WinInputBase.cs" />
|
<Compile Include="Platform\Windows\WinInputBase.cs" />
|
||||||
<Compile Include="WindowBorder.cs">
|
<Compile Include="WindowBorder.cs">
|
||||||
|
|
Loading…
Reference in a new issue