Re: Objects randomly not rendering on OffScreen Canvas
Posted by
philjord on
Aug 27, 2017; 8:28pm
URL: https://forum.jogamp.org/Objects-randomly-not-rendering-on-OffScreen-Canvas-tp4038163p4038166.html
tinker,
If Julien's ideas don't help I've onyl got a few thoughts that might get you started.
Firstly I'd check very carefully to make sure that you are access your doRender method in a synchronous manner primarily by putting the keyword synchronized on it, the two calls it makes to renderOffScreenBuffer and wait ForOffScreenBuffer are async calls so you definitely don't want multiple threads calling them at the same time.
I would then put a big fat Thread.sleep(5000) at the start of the method to see if the race condition can't be untangled by giving each pass some time. Though if you are single threaded this shouldn't really be required.
Then if the issue is still there I would get the java3d-core code cloned from here
https://github.com/hharrison/java3d-core.gitInto your IDE then in the JoglPipeline.java file change
private static final boolean VERBOSE = false;to
private static final boolean VERBOSE = true;And compare a working render to a non-working render, perhaps pasting the output here for comment.