How to use OpenGL ES on a separate thread on iphone?

前端 未结 3 527
我在风中等你
我在风中等你 2020-12-02 13:36

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. T

3条回答
  •  我在风中等你
    2020-12-02 14:21

    You need to create an EAGLSharegroup.

    Check out this thread on sharing OpenGL contexts between threads.

    UPDATE
    Previous to iOS5 I shared OpenGL contexts between threads to allow asynchronous loading of textures from disk. But iOS5's CVOpenGLESTextureCaches essentially make texture uploads free so I don't need shareGroups anymore and my code is simpler and faster.

提交回复
热议问题