From 9768febfabd19b1348a975c0f06e316f7127b70e Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Sun, 1 Oct 2017 20:35:04 +0200 Subject: [PATCH] Rename GraphicsContextFlags to ContextFlags and remove the setter. --- src/OpenTK.GLWidget/GLWidget.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/OpenTK.GLWidget/GLWidget.cs b/src/OpenTK.GLWidget/GLWidget.cs index a31b3dad..49e45f90 100644 --- a/src/OpenTK.GLWidget/GLWidget.cs +++ b/src/OpenTK.GLWidget/GLWidget.cs @@ -31,9 +31,9 @@ namespace OpenTK public double DeltaTime { get; private set; } /// - /// The set for this widget. + /// The set for this widget. /// - public GraphicsContextFlags GraphicsContextFlags { get; set; } + public GraphicsContextFlags ContextFlags { get; } /// /// Initializes a new instance of the class. @@ -55,12 +55,12 @@ namespace OpenTK /// The which the widget should be constructed with. /// The major OpenGL version to attempt to initialize. /// The minor OpenGL version to attempt to initialize. - /// + /// /// Any flags which should be used during initialization of the . /// - public GLWidget(GraphicsMode graphicsMode, int glVersionMajor, int glVersionMinor, GraphicsContextFlags graphicsContextFlags) + public GLWidget(GraphicsMode graphicsMode, int glVersionMajor, int glVersionMinor, GraphicsContextFlags contextFlags) { - GraphicsContextFlags = graphicsContextFlags; + ContextFlags = contextFlags; AddTickCallback(UpdateFrameTime); SetRequiredVersion(glVersionMajor, glVersionMinor); @@ -115,8 +115,8 @@ namespace OpenTK GetRequiredVersion(out var major, out var minor); gdkGLContext.SetRequiredVersion(major, minor); - gdkGLContext.DebugEnabled = GraphicsContextFlags.HasFlag(GraphicsContextFlags.Debug); - gdkGLContext.ForwardCompatible = GraphicsContextFlags.HasFlag(GraphicsContextFlags.ForwardCompatible); + gdkGLContext.DebugEnabled = ContextFlags.HasFlag(GraphicsContextFlags.Debug); + gdkGLContext.ForwardCompatible = ContextFlags.HasFlag(GraphicsContextFlags.ForwardCompatible); gdkGLContext.Realize(); return gdkGLContext; @@ -256,7 +256,7 @@ 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)) + if (ContextFlags.HasFlag(GraphicsContextFlags.Debug)) { _GraphicsContext.ErrorChecking = true; }