This allows forward compatible and debug contexts to be created, and
provides more descriptive exceptions in the case where the context
cannot be created with the requested settings.
return true;
}
+
+ /// <inheritdoc />
+ protected override GLContext OnCreateContext()
+ {
+ var gdkGLContext = Window.CreateGlContext();
+
+ GetRequiredVersion(out var major, out var minor);
+ gdkGLContext.SetRequiredVersion(major, minor);
+
+ gdkGLContext.DebugEnabled = GraphicsContextFlags.HasFlag(GraphicsContextFlags.Debug);
+ gdkGLContext.ForwardCompatible = GraphicsContextFlags.HasFlag(GraphicsContextFlags.ForwardCompatible);
+
+ gdkGLContext.Realize();
+ return gdkGLContext;
+ }
+
/// <summary>
/// Destructs this object.
/// </summary>