GL.Color3 and GL.Color4 overloaded to accept Vector3 and Vector4 structs.

This commit is contained in:
the_fiddler 2007-12-09 19:54:47 +00:00
parent a70754da07
commit 394d65b6d7

View file

@ -593,16 +593,27 @@ namespace OpenTK.OpenGL
#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)
{
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
#region public static void ClearColor() overloads
@ -681,12 +692,19 @@ namespace OpenTK.OpenGL
Delegates.glTranslatef(trans.X, trans.Y, trans.Z);
}
public static
void MultMatrix(Matrix4 mat)
public static void MultMatrix(Matrix4 mat)
{
MultMatrix(ref mat.Row0.X);
}
public static void Materialv(MaterialFace face, MaterialParameter pname, Vector4 @params)
{
unsafe
{
Materialv(face, pname, &@params.X);
}
}
#endregion
#region public static void ShaderSource(Int32 shader, System.String @string)