From 881b7553d992da58c2963ed2b4b1b2a286d96291 Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Sun, 1 Oct 2017 20:16:45 +0200 Subject: [PATCH] Enable error checking for debug contexts. --- src/OpenTK.GLWidget/GLWidget.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/OpenTK.GLWidget/GLWidget.cs b/src/OpenTK.GLWidget/GLWidget.cs index da6e580..a31b3da 100644 --- a/src/OpenTK.GLWidget/GLWidget.cs +++ b/src/OpenTK.GLWidget/GLWidget.cs @@ -256,6 +256,11 @@ namespace OpenTK // Create a dummy context that will grab the GdkGLContext that is current on the thread _GraphicsContext = new GraphicsContext(ContextHandle.Zero, null); + if (GraphicsContextFlags.HasFlag(GraphicsContextFlags.Debug)) + { + _GraphicsContext.ErrorChecking = true; + } + if (GraphicsContext.ShareContexts) { Interlocked.Increment(ref _GraphicsContextCount); -- 2.7.4