I’m rendering a VLSI chip design to screen. This is LOTS of polygons (roughly 1 billion at chip top). It is okay for this to take several seconds to render as long as it doesn’t block the UI.
What I would like to do is let Thread A continuously render to an off-screen FBO until completed and once every 1/60 of a second (or so–probably use an Animator) let the main GUI thread do a blit from the off-screen FBO to the screen. This way, Thread A runs at full-speed or close to it but doesn’t block the GUI thread and thus hang my responsiveness.
Can anybody point me to some sample code for this? The main issue I’m having is how to get a thread-safe, stable working reference to GL and the FBO when I’m not actually sitting in a GLEventListener callback.
Please note that this is different from deferring drawing to the main GUI thread. There are simply far too many polygons to even think about drawing them on the GUI thread.
Thanks.