Login  Register

Re: synchronization issues

Posted by ac on May 09, 2013; 4:36pm
URL: https://forum.jogamp.org/synchronization-issues-tp4029115p4029133.html

Ok, here there is some self-contained code that hopefully makes the problem more clear. I'm basically rendering this raymarching effect from shadertoy: https://www.shadertoy.com/view/MdX3Rr

If I use an Animator object to drive the rendering loop, I get the same level of smoothness as in shadertoy: http://pastebin.com/1Jwh9ZL0

But if I manually call canvas.display() from the drawing loop of the app, the playback is very choppy: http://pastebin.com/HpsgKQfn

Of course, running it on a very fast GPU could make the stuttering to disappear, as a reference I'm testing on a AMD Radeon HD 6490M.

Strangely enough, both apps report the same framerate (around 12~14 fps for my test system).

The vertex and fragment shaders are the same for both programs: http://pastebin.com/TKhmkUbk, http://pastebin.com/QJkzYpsz

So I guess that the method I'm using to manually drive the rendering loop is incorrect, but cannot realize why. Any ideas/suggestions will be greatly appreciated.

Andres