Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Hi, Guys, what's your maximum fps with JOGL on Windows??  (Read 2762 times)
0 Members and 1 Guest are viewing this topic.
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Posted 2005-06-15 03:13:53 »

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!
Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Reply #1 - Posted 2005-06-15 03:17:42 »

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

Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #2 - Posted 2005-06-15 03:25:38 »

Thanks, but is it a new API ?? I can't find it in my b10, should I use b12 ??
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Reply #3 - Posted 2005-06-15 03:29:12 »


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:
1  
2  
3  
4  
    if (gl.isExtensionAvailable("WGL_EXT_swap_control"))
        ((WGL) gl).wglSwapIntervalEXT(0);
     else
        System.out.println("VSync is on");

Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #4 - Posted 2005-06-15 03:37:15 »

Thank you very much indeed, you are great!! Grin
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #5 - Posted 2005-06-15 04:43:27 »

Oops, Cry 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

Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-06-15 04:46:56 »

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

Thanks
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #7 - Posted 2005-06-15 05:45:10 »

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.)

弾幕 ☆ @mahonnaiseblog
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #8 - Posted 2005-06-15 07:15:10 »

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.
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #9 - Posted 2005-06-15 08:04:34 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Bombadil

Senior Devvie





« Reply #10 - Posted 2005-06-15 08:27:12 »

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.)
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #11 - Posted 2005-06-15 08:51:51 »

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!
Offline wingser

Junior Newbie




Java games rock!


« Reply #12 - Posted 2005-06-19 06:39:40 »

  :oHuh well
Offline Soulfly32

Senior Newbie





« Reply #13 - Posted 2005-06-19 19:45:21 »

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

_____________________________________
www.soulfly-design.de
www.soulflyhome.com
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #14 - Posted 2005-06-20 01:57:35 »

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.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!