I understand that Cocoa requires that windows be created/managed on the main thread. So, I’d like to have two or three windows with unique contexts, but I’d really prefer to draw to each of them from separate threads. Plus, a little bit of Google searching seems to indicate that rapidly context-switching on one thread is pretty expensive/slow.
I understand that Cocoa requires that windows be created/managed on the main thread. So,
Share
You might want to look at the CGL interface for fast context switching, specifically:
CGLSetCurrentContext. However, it may be more consistent to use themakeCurrentContextmethod for NSOpenGLContext in a Cocoa application.