mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 04:05:36 +00:00
* GLHelper.cs: Added helpers for GetProgramInfoLog, VertexAttrib* and
MultiTexCoord*
This commit is contained in:
parent
dab5111c3a
commit
cedb2394ff
|
@ -796,6 +796,27 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region public static void GetProgramInfoLog(Int32 program, out string info)
|
||||||
|
|
||||||
|
public static void GetProgramInfoLog(Int32 program, out string info)
|
||||||
|
{
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
int length;
|
||||||
|
GL.GetProgram(program, ProgramParameter.InfoLogLength, out length);
|
||||||
|
if (length == 0)
|
||||||
|
{
|
||||||
|
info = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
StringBuilder sb = new StringBuilder(length);
|
||||||
|
Delegates.glGetProgramInfoLog((UInt32)program, sb.Capacity, &length, sb);
|
||||||
|
info = sb.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region public static void PointParameter(PointSpriteCoordOriginParameter param)
|
#region public static void PointParameter(PointSpriteCoordOriginParameter param)
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -812,6 +833,60 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
||||||
|
|
||||||
|
public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib2(index, v.X, v.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
||||||
|
|
||||||
|
public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
||||||
|
|
||||||
|
public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static void MultiTexCoord2(TextureUnit target, ref Vector2 v)
|
||||||
|
|
||||||
|
public static void MultiTexCoord2(TextureUnit target, ref Vector2 v)
|
||||||
|
{
|
||||||
|
GL.MultiTexCoord2(target, v.X, v.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static void MultiTexCoord3(TextureUnit target, ref Vector3 v)
|
||||||
|
|
||||||
|
public static void MultiTexCoord3(TextureUnit target, ref Vector3 v)
|
||||||
|
{
|
||||||
|
GL.MultiTexCoord3(target, v.X, v.Y, v.Z);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static void MultiTexCoord4(TextureUnit target, ref Vector4 v)
|
||||||
|
|
||||||
|
public static void MultiTexCoord4(TextureUnit target, ref Vector4 v)
|
||||||
|
{
|
||||||
|
GL.MultiTexCoord4(target, v.X, v.Y, v.Z, v.W);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue