mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 04:35:38 +00:00
Added Assert function for checking whether a GraphicsContext is exists in the calling thread.
This commit is contained in:
parent
b61bf2e77d
commit
73de884ee7
|
@ -93,9 +93,12 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region private GraphicsContext()
|
||||||
|
|
||||||
private GraphicsContext()
|
private GraphicsContext()
|
||||||
{
|
{ }
|
||||||
}
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to create a GraphicsContext object from an existing OpenGL context.
|
/// Attempts to create a GraphicsContext object from an existing OpenGL context.
|
||||||
|
@ -216,6 +219,19 @@ namespace OpenTK.Graphics
|
||||||
#region public static AvailableDisplayFormats
|
#region public static AvailableDisplayFormats
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static void Assert()
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks if a GraphicsContext exists in the calling thread and throws a GraphicsContextException if it doesn't.
|
||||||
|
/// </summary>
|
||||||
|
public static void Assert()
|
||||||
|
{
|
||||||
|
if (GraphicsContext.CurrentContext == null)
|
||||||
|
throw new GraphicsContextException();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -301,7 +317,7 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region --- IGLContextInternal Members ---
|
#region --- IGraphicsContextInternal Members ---
|
||||||
|
|
||||||
#region void LoadAll()
|
#region void LoadAll()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue