views:

73

answers:

1

Hello,

I have an old AGL-based OpenGL windowing system that I am updating to use NSOpenGLView. The engine using it needs to run in its own loop in a separate thread and I am having trouble getting that to work. With AGL, I created the context in the loop thread, so there was no issue, but I'm a little bit confused about the way to do that with NSOpenGLView. I'd like to be able to instantiate it in the nib, so I don't want to create the whole thing in the loop thread. Is it even possible otherwise?

Hope it makes sense.

+1  A: 

Your separate thread can attach the NSOpenGLContext it creates to an existing NSOpenGLView by using the setOpenGLContext: method.

tedge