* X11GLContext.cs: Correctly set GraphicsMode in constructor (resolves issue [#1175]: "Graphics] GraphicsContext.GraphicsMode property returns null on Linux").
This commit is contained in:
parent
38196c57f5
commit
e2dd2cb58f
1 changed files with 2 additions and 3 deletions
|
@ -24,7 +24,6 @@ namespace OpenTK.Platform.X11
|
||||||
bool vsync_supported;
|
bool vsync_supported;
|
||||||
int vsync_interval;
|
int vsync_interval;
|
||||||
bool glx_loaded;
|
bool glx_loaded;
|
||||||
GraphicsMode graphics_mode;
|
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
|
||||||
|
@ -36,6 +35,8 @@ namespace OpenTK.Platform.X11
|
||||||
if (window == null)
|
if (window == null)
|
||||||
throw new ArgumentNullException("window");
|
throw new ArgumentNullException("window");
|
||||||
|
|
||||||
|
Mode = mode;
|
||||||
|
|
||||||
currentWindow = (X11WindowInfo)window;
|
currentWindow = (X11WindowInfo)window;
|
||||||
currentWindow.VisualInfo = SelectVisual(mode, currentWindow);
|
currentWindow.VisualInfo = SelectVisual(mode, currentWindow);
|
||||||
|
|
||||||
|
@ -138,8 +139,6 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
if (!Glx.IsDirect(currentWindow.Display, Handle.Handle))
|
if (!Glx.IsDirect(currentWindow.Display, Handle.Handle))
|
||||||
Debug.Print("Warning: Context is not direct.");
|
Debug.Print("Warning: Context is not direct.");
|
||||||
|
|
||||||
graphics_mode = mode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue