I wanted to post my solution up just incase someone ever runs into anything 
similar. I was able to take Robert's solution 2 and run with it. I split up the 
scenegraph under a switch node that renders different subgraphs on different 
frame calls. I have also created my own implementation of an incremental 
viewer->frame() call. It first runs all the event and update traversals, then 
incrementally renders the different subgraphs without swapping buffers. 
Finally, after all subgraphs have been rendered, the buffers are swapped.

Also, I had to stick a glFinish() call after rendering each subgraph in order 
to force the GPU queue to be executed. Otherwise I would still have the same 
issue that iOS would handle all the processing behind the scenes and end up 
blocking all my application events until the GPU finished regardless of whether 
I was rendering on a worker thread.

My final note is that I ended up using a GraphicsWindowEmbedded and controlling 
all of the graphics context directly in OpenGLES. This allowed me to implement 
a worker thread that uses the DisplayLink to fire the viewer->frame() call on a 
GCD queue. Since I'm calling glFinish() on a worker thread in the GCD queue, 
blocking the CPU while the GPU queue is executed doesn't hang the main thread 
at all allowing all the iOS events to still come in.

Thanks again for all the help Robert!
--

Christian

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43453#43453





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to