diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index 44b58425..2761b7fd 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -360,7 +360,7 @@ namespace OpenTK.Platform.X11 if (glContext == null) throw new ApplicationException("Could not create GLContext"); Debug.Print("Created GLContext"); - window.VisualInfo = ((X11.WindowInfo)(glContext as IGLContextInternal).Info).VisualInfo; + window.VisualInfo = ((X11.WindowInfo)((IGLContextInternal)glContext).Info).VisualInfo; //window.VisualInfo = Marshal.PtrToStructure(Glx.ChooseVisual(window.Display, window.Screen, // Create a window on this display using the visual above