GraphicsModeException when creating GLControl on X11 #17

Closed
thefiddler opened this Issue Dec 14, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@thefiddler
Contributor

thefiddler commented Dec 14, 2013

Using WinForms GLControl on Linux fails with:

OpenTK.Graphics.GraphicsModeException: Invalid or unsupported GraphicsMode.
  at OpenTK.X11GLControl..ctor (OpenTK.Graphics.GraphicsMode mode, System.Windows.Forms.Control control) [0x0003b] in /home/parallels/opentk/Source/GLControl/X11GLControl.cs:76 
  at OpenTK.GLControlFactory.CreateGLControl (OpenTK.Graphics.GraphicsMode mode, System.Windows.Forms.Control control) [0x00062] in /home/parallels/opentk/Source/GLControl/GLControlFactory.cs:49 
  at OpenTK.GLControl.OnHandleCreated (System.EventArgs e) [0x0004c] in /home/parallels/opentk/Source/GLControl/GLControl.cs:192 
  at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.UserControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
OpenTK.Graphics.GraphicsContextMissingException: No context is current in the calling thread (ThreadId: 1).
  at OpenTK.Graphics.OpenGL.ErrorHelper..ctor (IGraphicsContext context) [0x00006] in /home/parallels/opentk/Source/OpenTK/Graphics/OpenGL/ErrorHelper.cs:61 
  at OpenTK.Graphics.OpenGL.GL.GetString (StringName name) [0x00000] in /home/parallels/opentk/Source/OpenTK/Graphics/OpenGL/GL.cs:83497 
  at Examples.WinForms.GameLoopForm.OnLoad (System.EventArgs e) [0x00063] in /home/parallels/opentk/Source/Examples/OpenTK/GLControl/GLControlGameLoop.cs:50 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0 

Tested on Ubuntu 12.04. Original report here: http://www.opentk.com/node/3472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment