Added helper overloads for OpenTK.Point/Rectangle structures.
This commit is contained in:
parent
6770e171ed
commit
40235d84ca
2 changed files with 34 additions and 0 deletions
|
@ -82,6 +82,11 @@ namespace OpenTK.Graphics.ES20
|
|||
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||
}
|
||||
|
||||
public static void BlendColor(Color4 color)
|
||||
{
|
||||
GL.BlendColor(color.R, color.G, color.B, color.A);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Uniform
|
||||
|
@ -385,6 +390,16 @@ namespace OpenTK.Graphics.ES20
|
|||
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||
}
|
||||
|
||||
public static void Viewport(OpenTK.Point location, OpenTK.Size size)
|
||||
{
|
||||
GL.Viewport(location.X, location.Y, size.Width, size.Height);
|
||||
}
|
||||
|
||||
public static void Viewport(OpenTK.Rectangle rectangle)
|
||||
{
|
||||
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#pragma warning restore 3019
|
||||
|
|
|
@ -123,6 +123,10 @@ namespace OpenTK.Graphics.OpenGL
|
|||
GL.Color4(color.X, color.Y, color.Z, color.W);
|
||||
}
|
||||
|
||||
public static void Color4(Color4 color)
|
||||
{
|
||||
GL.Color4(color.R, color.G, color.B, color.A);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -147,6 +151,11 @@ namespace OpenTK.Graphics.OpenGL
|
|||
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||
}
|
||||
|
||||
public static void BlendColor(Color4 color)
|
||||
{
|
||||
GL.BlendColor(color.R, color.G, color.B, color.A);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public static void Material() overloads
|
||||
|
@ -818,6 +827,16 @@ namespace OpenTK.Graphics.OpenGL
|
|||
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||
}
|
||||
|
||||
public static void Viewport(OpenTK.Point location, OpenTK.Size size)
|
||||
{
|
||||
GL.Viewport(location.X, location.Y, size.Width, size.Height);
|
||||
}
|
||||
|
||||
public static void Viewport(OpenTK.Rectangle rectangle)
|
||||
{
|
||||
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TexEnv
|
||||
|
|
Loading…
Reference in a new issue