High pitched feeping sound when using LWJGL_OPENGL2/3

Hi, maybe someone else stumbled across this problem, but my graphics card always started to feep in a rather high pitch whenever I started my application using said renderers.

A friend of mine told me yesterday why and how to solve this problem, so maybe this is for people with the same issue:



When you just start an application (whether it be SimpleApplication or self-written) there’s no limit to your frames per second, or rather to your time per frame. This causes the graphics card to go to its limits and get everything out of its part it possibly can (thus you should have an fps of about 5000 or something, when starting the SimpleApplication example in the tutorials). This also causes its capacitors to work on extreme high-performance, thus generating a high-pitched sound. Simply limit your time per frame in the update()-method of your application (I limited it to 60 fps) by calling Thread.sleep(long mills); to get rid of that. Crysis had this problem when switching to the game’s option menu and Starcraft 2 had this problem even when being idle in the normale starting screen (not playing a mission) which some might’ve heard of in the news (starcraft 2 crashing the pc after x minutes of idleness). I hope this could be of help to some people. :slight_smile:

Resonance Frequency of the transistors.



There’s a better way to handle this problem though:



[java]

public static void main(String[] args) {

app = new Main();

settings = new AppSettings(true);

settings.setFrameRate(200);

settings.setTitle(“Name of your app yay”);

app.setSettings(settings);

app.start();

}

[/java]



And just change your desired framerate to whatever. The engine will handle the rest. That performance evaluation application that @EmpirePhoenix made recently over in http://hub.jmonkeyengine.org/groups/general/forum/topic/object-count-performance-sourvey-everyone-please-participate/ did something interesting with framerate too if I recall right.



Cheers

~FlaH