I am working on a multi threaded OpenGL application with OpenTK 3 and WinForms. I have 2 shared GraphicsContexts:
- a "main" rendering context, used for scene drawing and synchronous load operations.
- a "secondary" resource loader context, used to load resources during draw.
This secondary context is used to load video frames coming from a Windows Media Foundation session (with a custom media sink). However, i have no control on what thread this media sink is running on, so i need a way, after each loading operation, to "unbind" that secondary GraphicsContext, so that it can be bound in the next thread where it will be needed.
Do I have to P/Invoke wglMakeCurrent(NULL, NULL) or is there a proper OpenTK way of doing this?