mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 16:55:28 +00:00
Applied teichgraf's patch that adds LoadTransposeMatrix overloads, and makes LoadMatrix user ref Matrix4 instead.
This commit is contained in:
parent
e6bfaa28ef
commit
301ebcc0b7
|
@ -708,9 +708,48 @@ namespace OpenTK.Graphics.OpenGL
|
|||
Delegates.glTranslatef(trans.X, trans.Y, trans.Z);
|
||||
}
|
||||
|
||||
public static void MultMatrix(Matrix4 mat)
|
||||
public static void MultMatrix(ref Matrix4 mat)
|
||||
{
|
||||
MultMatrix(ref mat.Row0.X);
|
||||
unsafe
|
||||
{
|
||||
fixed (Single* m_ptr = &mat.Row0.X)
|
||||
{
|
||||
Delegates.glMultMatrixf((Single*)m_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadMatrix(ref Matrix4 mat)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (Single* m_ptr = &mat.Row0.X)
|
||||
{
|
||||
Delegates.glLoadMatrixf((Single*)m_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadTransposeMatrix(ref Matrix4 mat)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (Single* m_ptr = &mat.Row0.X)
|
||||
{
|
||||
Delegates.glLoadTransposeMatrixf((Single*)m_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void MultTransposeMatrix(ref Matrix4 mat)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (Single* m_ptr = &mat.Row0.X)
|
||||
{
|
||||
Delegates.glMultTransposeMatrixf((Single*)m_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Materialv(MaterialFace face, MaterialParameter pname, Vector4 @params)
|
||||
|
|
Loading…
Reference in a new issue