Login  Register

Best way to scene incremental drawing

Posted by EvilMax on Mar 29, 2015; 6:19pm
URL: https://forum.jogamp.org/Best-way-to-scene-incremental-drawing-tp4034213.html

Hello!

I need to draw quite complex scene, where there will be objects with different drawing algorithm. For example, several objects that should be rendered with different ray marching algorithm, several 3D objects with different geometry (spheres, polyhedrons, axes etc) plus text. These objects will have different position plus some of them will be added and removed dynamically.  According to my needs I think that solution will be FBO (and I have used it for ray tracing inside the volume), but questions are following:

1. What is the best (from performance) way to draw such scene incrementally, when different objects must be rendered separately in different classes? I.e. how to combine ray traced volumes, simple geometry actors, text which should be displayed in different parts of the program?
2. How to preserve correct depth tests in this case? (Well, I know that FBO can have some thing called 'depth attachment' but have no idea how to reuse it in different parts of the program to correctly render objects as the whole scene)

Actually, answer with links to some articles, chapters in books and samples will be the best, because I have some skills in OpenGL, but never coped with incremental drawing/ depth testing before.

All help will be appreciated.

P.S.  All is being implemented according to requirement that OpenGL 3.3 should be supported, so all drawings I do in 'modern way' through VAOs/VBOs.