This is an attempt to create a separate context for the drawmanager.
This has two benefits:
- We can run this context in parallel with the UI context. (multithreaded F12 render)
- The Batches' VAOs are creating under this only context making multiple window viewport work (because every viewport rendering uses this context).
All resources are shared with all contexts (as always).
For now only Linux and Windows are supported.
(Windows support is courtesy of @Germano Cavalcante (mano-wii))
There is still crashes and instabilities due to the old way of managing contexts and FBO / VAO. Freeing is particulary bad.
This does not fix VAOs used under each UI windows contexts (i.e. the normal widget [see sky texture node]).
To reviewers: I want to know if this approach is not too much invasive in respect to the WM code. And if the GHOST part makes sense. Also not sure about all the naming of functions.