mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-26 18:01:06 +00:00
GL.Color3 and GL.Color4 overloaded to accept Vector3 and Vector4 structs.
This commit is contained in:
parent
a70754da07
commit
394d65b6d7
|
@ -593,16 +593,27 @@ namespace OpenTK.OpenGL
|
||||||
|
|
||||||
#region public static void Color[34]() overloads
|
#region public static void Color[34]() overloads
|
||||||
|
|
||||||
|
public static void Color3(System.Drawing.Color color)
|
||||||
|
{
|
||||||
|
GL.Color3(color.R, color.G, color.B);
|
||||||
|
}
|
||||||
|
|
||||||
public static void Color4(System.Drawing.Color color)
|
public static void Color4(System.Drawing.Color color)
|
||||||
{
|
{
|
||||||
GL.Color4(color.R, color.G, color.B, color.A);
|
GL.Color4(color.R, color.G, color.B, color.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Color3(System.Drawing.Color color)
|
public static void Color3(Vector3 color)
|
||||||
{
|
{
|
||||||
GL.Color3(color.R, color.G, color.B);
|
GL.Color3(color.X, color.Y, color.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Color4(Vector4 color)
|
||||||
|
{
|
||||||
|
GL.Color4(color.X, color.Y, color.Z, color.W);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public static void ClearColor() overloads
|
#region public static void ClearColor() overloads
|
||||||
|
@ -681,12 +692,19 @@ namespace OpenTK.OpenGL
|
||||||
Delegates.glTranslatef(trans.X, trans.Y, trans.Z);
|
Delegates.glTranslatef(trans.X, trans.Y, trans.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static
|
public static void MultMatrix(Matrix4 mat)
|
||||||
void MultMatrix(Matrix4 mat)
|
|
||||||
{
|
{
|
||||||
MultMatrix(ref mat.Row0.X);
|
MultMatrix(ref mat.Row0.X);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Materialv(MaterialFace face, MaterialParameter pname, Vector4 @params)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
Materialv(face, pname, &@params.X);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public static void ShaderSource(Int32 shader, System.String @string)
|
#region public static void ShaderSource(Int32 shader, System.String @string)
|
||||||
|
|
Loading…
Reference in a new issue