From e2dd2cb58f4f31129c611bb4da447d6f336a9018 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 19 Oct 2009 18:11:32 +0000 Subject: [PATCH] * X11GLContext.cs: Correctly set GraphicsMode in constructor (resolves issue [#1175]: "Graphics] GraphicsContext.GraphicsMode property returns null on Linux"). --- Source/OpenTK/Platform/X11/X11GLContext.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/OpenTK/Platform/X11/X11GLContext.cs b/Source/OpenTK/Platform/X11/X11GLContext.cs index 7c3fec27..4642ccb2 100644 --- a/Source/OpenTK/Platform/X11/X11GLContext.cs +++ b/Source/OpenTK/Platform/X11/X11GLContext.cs @@ -24,7 +24,6 @@ namespace OpenTK.Platform.X11 bool vsync_supported; int vsync_interval; bool glx_loaded; - GraphicsMode graphics_mode; #region --- Constructors --- @@ -36,6 +35,8 @@ namespace OpenTK.Platform.X11 if (window == null) throw new ArgumentNullException("window"); + Mode = mode; + currentWindow = (X11WindowInfo)window; currentWindow.VisualInfo = SelectVisual(mode, currentWindow); @@ -138,8 +139,6 @@ namespace OpenTK.Platform.X11 if (!Glx.IsDirect(currentWindow.Display, Handle.Handle)) Debug.Print("Warning: Context is not direct."); - - graphics_mode = mode; } #endregion