Search code examples
iosopengl-eseaglcontext

EAGLContext presentRenderbuffer on second thread?


I'm porting my game engine to iOS and am running in to an exception at my [EAGLContext presentRenderbuffer:] call. My engine has all rendering code on a separate thread to the main one; the engine works by creating the CAEAGLLayer and EAGLContext on the main thread, activating the context and creating the framebuffer for the view, then deactivating the context. After that for each frame my render thread then activates the context, binds the framebuffer, draws, and finally presents the render buffer.

Is it possible to call presentRenderbuffer: on a secondary thread, or is that the cause of my issues?


Solution

  • It looks like this behaviour must have changed as I am able to use an EAGLContext on a secondary thread without issues (testing on iOS7/iOS8)