rhdxmr
|
Posted: February 06, 2010 16:49 by rhdxmr
|
|
Hi, all JOGL users ![]() I felt that the same JOGL program running in the MS windows is much faster than in the Linux. But soon, I realize that in MS windows the java process consumes all CPU usage(99%) when JOGL program uses Animator. What will make the program reduce the CPU usage? And How can I set the speed of Animator, which is independent of platform or performance of machines? Thanks. |
how to reduce CPU usage while Animator is running
Replies: 2 - Last Post: February 07, 2010 06:14
by: rhdxmr
by: rhdxmr
showing 1 - 3 of 3
Michael Bien
|
Posted: February 06, 2010 17:33 by Michael Bien
|
|
hi rhdxmr, what you want is to limit the FPS. The easiest (and smoothest) way of doing this is by enabling vsync. This will tell the driver to limit the FPS to the screen refresh rate. (put it somewhere in the init() method) gl.glSetSwapInterval(1); // 1 == true however some drivers allow to override this via driver settings and you can't do anything about that in your app. |
Replies: 2 - Last Post: February 07, 2010 06:14
by: rhdxmr
by: rhdxmr








