The OpenGL ES rendering loop is placed on a separate thread in my iphone application. Everything goes fine except that the EAGLContext's presentRenderbuffer method fails. The result is a blank white screen. When the same code is run on the main thread, presentRenderbuffer succeeds and the graphics is properly shown. What is the correct way of doing OpenGL on a separate thread?
A:
You shouldn't render the context on a different thread. Instead, do all the calculations on a different thread, and then ensure the rendering occurs on the main display thread.
AlBlue
2009-08-10 08:45:25
+4
A:
You need to create an EAGLSharegroup
.
Check out this thread on sharing OpenGL contexts between threads.
Rhythmic Fistman
2009-08-10 10:50:27