Is there a way that I can obtain the ID/handle of the current OpenGL context, so that I can switch to it using Context.MakeCurrent()?
I need to access the OpenGL context that is created by a 3rd party COM object. The COM object is a graphic window you embed in a windows Form, much like the GLControl feature in OpenTK. The COM object doesn't provide access to its OpenGL resources, the only thing it provides me with is a method called 'Scene.Render,' which just updates the graphics of the embedded window.
Interestingly, I've found that immediately after I call Scene.Render, but before I switch to my own GameWindow context, the COM object's context is still current. So I can call OpenTK commands as normal and draw shapes, load and display textures, and load and run shaders...all within this context. The only issue is that I have to call Scene.Render so that I have access to the context, add my graphics, then call Scene.Render again so that my stuff is shown. Is there a way I can get the ID/handle of the COM object's context once I make it current, and then switch to that context whenever I want?