Re: DirtyType mechanism...
Posted by
ThomasR on
Jul 27, 2017; 3:12am
URL: https://forum.jogamp.org/DirtyType-mechanism-tp4038074p4038081.html
Thank you for reply!
gouessej wrote
It will draw everything again. I don't see how redrawing only newly attached nodes would help. When you add a new node into a scene, it won't be always in front of all other nodes in your frustum, redrawing only the new node without clearing some buffers might lead to something visually completely wrong.
Okay, that makes sense: adding or pairing the scene requires everything to be redrawn. So the most general, safest approach is to redraw when anything in the scene changes?
gouessej wrote
You know that you can already redraw on demand, you're not forced to redraw everything always.
Not sure what you mean by "redraw on demand"? You had said above that updateFrame() should not be called from multiple threads so I have a single runner thread which does this:
while (!exit) {
if (!pause) {
frameWork.updateFrame();
}
delay(20); // 50 fps
}
Apparently updateFrame schedules on some other thread which ultimately calls Scene.renderUnto wherein I check
conditions like isDirty(DirtyType.Transform) before redrawing.
gouessej wrote
What would you like to avoid?
I'm just trying to understand how to get the best performance with this impressive software.
Tom