andrey
andrey

Reputation: 201

Is opengl vsync fixed or it's can fluctuate?

In OpenGl (under android if it's matter) does vsync signal absolutely fixed at every 16.6 ms interval and can not fluctuate or could it be a little "moveable" in some circumstance ?

I mean it's must it be absolutely like this:

16.6ms --- 16.6ms --- 16.6ms --- etc

or could it be like this?:

16.6ms -- 18ms --- 16.6ms --- 15ms --- etc ...

I ask this because between each eglswapBuffers I have strange value like 15ms, 18ms, 22ms, etc... and I don't understand why.

this is the delay i have (in ms) between each eglswapbuffers durring an animation :

|10|13|16|24|17|10|17|17|17|16|17|19|15|17|17|18|16|16|17|17|17|17|17|17|17|17|17|18|16|16|17|17|17|18|16|15|17|17|17|27|20|20|15|14|14|17|10|11|17|17|20|19|14|14|17|17|17|44|27|13|18|14|16|17|21|17|11|17|17|17|17|17|17|17|17|18|15|17|17|18|16|17|17|17|17|17|17|16|21|12|17|17|16|18|20|18|13|15|21|14|21|24|24|20|7|7|14|17|17|17|17|17|17|17|18|21|24|19|21|16|10|10|12|16|17|17|18|16|17|17|16|17|17|17|18|19|18|12|15|16|17|17|17|23|13|16|23|13|14|16|17|17|18|16|19|15|21|17|13|16|17|17|17|17|18|24|18|11|11|26|19|19|12|17|14|8|14|17|17|17|

Upvotes: 0

Views: 430

Answers (1)

solidpixel
solidpixel

Reputation: 12239

Calling eglSwapBuffers doesn't actually swap the buffers; it's just an asynchronous signal telling the driver stack that the application has finished composing the current frame. The actual display swap may happen some time later, so the amount of time between swaps may well be a little variable, especially if you have other threads running which may add jitter to when the application thread is rescheduled.

Exact vsync performance depends on the display panel; it's normally 16.6ms (60 FPS), but YMMV, especially on desktop with technologies like g-sync (which is basically dynamically variable vsync).

Upvotes: 2

Related Questions