Hi, Guys, what's your maximum fps with JOGL on Windows??

I found that I can’t get fps larger than 65, even with small models and ATI 9700 on WindowsXP, while I can get more than 100 fps on Debian with Nvidia 5700LE.

What’s your fps and are there any trick?

Regards!

Your getting the default framerate which matches the refresh rate of your monitor (65Hz in your case), this is called video synch or vsynch.

To shut it off, call: gl.setSwapInterval(0) in your init() method

Thanks, but is it a new API ?? I can’t find it in my b10, should I use b12 ??

It is a new api that is more OS independent then the old API which is done using:
((WGL) gl).wglSwapIntervalEXT(0);

That way will work, but probably only on windows. Doing that way you should check for the extension:

like:


    if (gl.isExtensionAvailable("WGL_EXT_swap_control"))
        ((WGL) gl).wglSwapIntervalEXT(0);
     else
        System.out.println("VSync is on");

Thank you very much indeed, you are great!! ;D

Oops, :’( I changed to b12 and used gl.setSwapInterval(0), but no frame rates change be visible
I tried both ATI 9700 and Nvidia 5700LE on WindowsXP
It remains 64fps while on a Debian box I can render up to 250fps

One thing to note is that I’m not using double buffer at present, doese it matter ?

Thanks

The driver can ignore your “request” if it wants to do that.

You can find that setting under the 3D tab->opengl->user defined

(I recommend “on by default”, which obviously means it’s usually on, but software can turn it off.)

I don’t think it’s the problem of driver setting, for the vsync setting of my 5700LE is “application control”
I don’t know if there are any benchmark program in JOGL to test the frame rates.
Strange.

There must be some place wrong with my program for I just test Gears, it can run at 900fps on the windows box, but I don’t know where the problem is, maybe the swing or java thread related problems.

Could you give more details what exactly you draw and how?
Do other (native for example) OpenGL applications under your Winblows have more than 65 FPS ?

Are you sure you’re doing
gl.setSwapInterval(0)
in your init() method of your GLEventListener child class?

If a JOGL app draws just a few OpenGL lines/polygons/textures/etc you should well see more than 65 fps even within Winblows.
Also with Swing components laying next to the GLCanvas: no problem.
Fullscreen and windowed mode. (With fullscreen you’ll usually see a much higher FPS rate.)

Thank you all, I know what the problem is!!!
For I use a timer to drive the JOGL rendering, and I don’t know before that the time precision on Windows can only reach 15ms.
I found it’s very strange that the fps can’t exceed 65fps, so I searched google for “java 15ms”, and I got it
http://forum.java.sun.com/thread.jspa?threadID=612991&messageID=3387915

They call it “damn windows”, maybe some truth, it means that under windows you can’t use a timer to reach more than 65 Hz, really bad.

However, I’m very glad to find the answer at last and learned much from the forum, it’s great!!
Thank all who helped me. Welcome to China!

:oHuh well

Little question
which Animator do you use?
FPSAnimator or orig Animator

No, I didn’t use JOGL Animator, I’m using java.util.Timer.scheduleAtFixedRate() to call gldrawable.display(). I think this method is less efficient for it needs to pump the event into the event queue and the real rendering occurs in another thread.