CPU 50%

Started by Eistoeter, December 30, 2008, 10:12:11

Previous topic - Next topic

Eistoeter

Hi

I have a little question about LWJGL: I'm running my game in windowed mode. If the window is active my CPU load is at 50%. The problem (or is this normal behaviour?) is also if I reduce my main loop to the essentials which is:

while (!(Display.isCloseRequested())) {
Display.update();
Display.sync(120);
}
Display.destroy();

Matzon

You are saying - render/update as fast as possible, but limit to 120 frames per second (pretty high). Lower the number to something normal like 60 or even 30. And yes, this is normal behavior.

Eistoeter

Thanks for the quick answer. The sync should just be a last safety hold if vsync fails but I reduced it to 60 :-)

I just wondered why it is so cpu intensive. If I start for example winamp that has also visualization showing audio pitches and does much other stuff like playing music I only get cpu load 3%.