Login  Register

Re: GLCanvas Built-In FPS cap?

Posted by Sven Gothel on Apr 14, 2013; 4:18am
URL: https://forum.jogamp.org/GLCanvas-Built-In-FPS-cap-tp4028958p4028959.html

On 04/14/2013 06:01 AM, bgroenks96 [via jogamp] wrote:

> I have an object registered as a GLEventListener for a GLCanvas and a thread
> that calls 'canvas.display()' at a fixed timestep (basically my own rendering
> loop as opposed to using Animator).
>
> I set the target FPS for my loop to a huge number to see what the max FPS I
> could get out of the OpenGL renderer was.  To my surprise, the frame rate
> remained locked at 60 fps.
>
> I tested the timestep by removing the call to canvas.display().  The target
> FPS was approximately reached.
>
> Is this just something I'm not aware of in GLCanvas or the generated
> GLAutoDrawable?  Or do I need to set something in the canvas, profile or
> GLCapabilities objects?
depending on the GL profile (> GL2) default it swap interval == 1,
i.e. vsync of your screen.

this is also true for OSX/CALayer.

use gl.setSwapInterval(0) to disable it.

~Sven



signature.asc (911 bytes) Download Attachment