Enable error checking for debug contexts.

This commit is contained in:
Jarl Gullberg 2017-10-01 20:16:45 +02:00
parent c8ca1f33df
commit 881b7553d9
No known key found for this signature in database
GPG key ID: FBB69BD7CAE095A0

View file

@ -256,6 +256,11 @@ namespace OpenTK
// Create a dummy context that will grab the GdkGLContext that is current on the thread // Create a dummy context that will grab the GdkGLContext that is current on the thread
_GraphicsContext = new GraphicsContext(ContextHandle.Zero, null); _GraphicsContext = new GraphicsContext(ContextHandle.Zero, null);
if (GraphicsContextFlags.HasFlag(GraphicsContextFlags.Debug))
{
_GraphicsContext.ErrorChecking = true;
}
if (GraphicsContext.ShareContexts) if (GraphicsContext.ShareContexts)
{ {
Interlocked.Increment(ref _GraphicsContextCount); Interlocked.Increment(ref _GraphicsContextCount);