LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Cornix on November 18, 2013, 20:09:59

Title: Start application twice - Second application has bad performance
Post by: Cornix on November 18, 2013, 20:09:59
Hi there.

Just by accident I started my application twice today and and saw, that the performance for the second window was much worse then for the first.
Its a very simple test program. It only creates a display and draws a single quad in the center of the screen using glDrawArrays.
I set the frame rate to 60 fps and the first instance of the application manages that easily.
The second window, however, only goes between 18 - 21 fps.

Edit: I did some further testing. Disabling VSync solved it. Is that normal that VSync drops the frame rate that badly?

Thank you in advance.
Title: Re: Start application twice - Second application has bad performance
Post by: quew8 on November 19, 2013, 07:35:37
Well VSync is a synchronisation between the monitor and the game loop right? So imagine what happens when you have two different loops both trying to synchronise to the same monitor at the same time. Something has to give.

To be clear, I've never seen this or heard of this before so I'm just throwing my opinion out into the wind.
Title: Re: Start application twice - Second application has bad performance
Post by: Cornix on November 19, 2013, 08:57:43
Well yes, that kind of makes sense.
But arent there plenty of applications using VSync? I never knew you couldnt run 2 of them at the same time. Sounds dubious to me.