TheBuzzSaw
TheBuzzSaw

Reputation: 8836

What is the Cocoa/OSX equivalent of wglMakeCurrent or glXMakeCurrent?

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.

Upvotes: 3

Views: 401

Answers (1)

Brett Hale
Brett Hale

Reputation: 22358

You might want to look at the CGL interface for fast context switching, specifically: CGLSetCurrentContext. However, it may be more consistent to use the makeCurrentContext method for NSOpenGLContext in a Cocoa application.

Upvotes: 1

Related Questions