disabling Video synchronization problem

Hi, I am having no luck disabling vsync using JOGL.

When I call:

gl.wglSwapIntervalEXT(0)

Then call: System.out.println("SWAP INTERVAL: "+ gl.wglGetSwapIntervalEXT());

I get:

SWAP INTERVAL: 0

but…I still only get the default 63 FPS…always…even with no rendereing at all.

Is this a noop in JOGL? My card does support the extension (Geo 4). I am running Windows XP, Java 1.5.

When I run LWJGL applications, they seem to have no problems turnning of vsync.

Any suggestions? Is it a bug? Does anyone else have this problem?

Vorax,

I just tried it, and it seems to work OK for me.

Specifically, I set my VSYNC settings for the driver to ‘Application Controlled’, and then used the following code:

        if (gl.isExtensionAvailable("WGL_EXT_swap_control")) {
            System.out.println("Disabling VSYNC");
            ((WGL)gl).wglSwapIntervalEXT(0);
        }

If you run my kit2 demo (Which now has this code in v0.04) you might be able to see this.

http://abraded.co.uk/jogl/

I get frame rates of > 80fps even though my display is 75Hz. If I remove ths code, the frame rates are capped to below 75fps. This is with an NVIDIA FX5200.

Do you get > 63fps if you set VSYNC to always off in your driver settings ?

Rob

It works great in your performance test, but not in my application. I have always had the vsync software controllable.

What’s worse, I never get more the 63FPS in my app no matter what my monitor refresh is set at.

What version of JOGL are you using including in the test? I am running 1.1 b07

I am using a custom loop that basically calls the display method directly and manually swaps the buffers, this should have no thread impediments or checking overhead. I also setup a test program to do nothing but show FPS and use the standard JOGL controlled GL listeners…no effect 63 FPS always.

I’m using JOGL 1.1b7 also, using fairly vanilla rendering as per the JOGL gears demo.

Have you tried downloading and compiling the Gears demo to see if you are capped at 63fps for that ?

If it’s OK, you’ll have some code that you can compare-and-contrast your code with.

Rob

Doh! Iit was my fps counter. It was tweaked for my animation thread which tries to achieve a consistent 63 fps…copy and pasting code is a bad idea…copying and pasting old code without looking at it is just stupid :wink:

Thanks for the help and at least the effort made your performance test a little better :slight_smile: