[Vm-dev] Mac + OpenGL and makeCurrent()

Igor Stasenko siguctua at gmail.com
Thu May 17 13:54:36 UTC 2012


lately i discovered that my small NBOpenGL demos is not working under
Cocoas VMs.
The reason, i found is that Cocoa VM using OpenGL by own for blitting
the image on screen, and
activates own opengl context when doing that.

The problem is that it doesn't restores back the previously active context,
as result, all calls in image invoked under wrong context , and things
are messed up.

We tried to quickly fix the problem with Esteban by introducing
save/restore calls before changing
the context, but no success.

It seems like Cocoa doing something extra in addition to making call
to makeCurrent() ,
or probably tracking the active context by own, and simply don't sees
the context created outside of

I modified the demo code to switch back to my context when rendering.
And things are working.
Unless you will need to debug the rendering code and step over gl
calls. This won't work anymore,
because VM stealing the context. :(

Any ideas what can be done?

Best regards,
Igor Stasenko.

More information about the Vm-dev mailing list