After playing with it a bit it looks like I can give control back to the main game with a bit of wglMakeCurrent hackery, and saving and restoring the contexts before creating the window, since that wants to override the context, Now the problem is that the SFML window doesn't render, because my context code has overridden it, and the if (Window::SetCurrent()) isn't doing anything because it thinks it already has the context set.
It looks like what I need is to modify SFML to respect an existing context.
If I comment out the
ourCurrent = this;
in
WindowImpl::SetCurrent()
so it doesn't track its own context it seems to work correctly, and both the game and the SFML window render properly it seems. Is wglMakeCurrent expensive to call so often? Is there an alternative to achieve the same effect or is this the only option to address this?
Any recommendations on how this can be cleanly addressed? Is this something that should be handled internal to SFML? Or is it too special case and I should just hack around it?
Thanks
J