luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample SingleContext does not work

stefslon opened this issue · comments

I get an invalid exception when trying to run provided SingleContext sample. I am running Visual Studio 2017 Community on Windows 7.

Here is the stack trace I get:
************** Exception Text ************** System.InvalidOperationException: no GlControl sharing with MainContext at OpenGL.GlControl.ReuseOtherContext() in ...\OpenGL.Net-master\OpenGL.Net.WinForms\GlControl.cs:line 917 at OpenGL.GlControl.CreateContext() in ...\OpenGL.Net-master\OpenGL.Net.WinForms\GlControl.cs:line 749 at OpenGL.GlControl.OnHandleCreated(EventArgs e) in ...\OpenGL.Net-master\OpenGL.Net.WinForms\GlControl.cs:line 1196 at System.Windows.Forms.Control.WmCreate(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.UserControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Looking at the GlControl it seems that there is no code to actually add entries to _SharingControls property.