Questions tagged [vsync]

Vsync (short for Vertical Synchronization) is a rendering option for video cards. This option prevents the video card from changing the display memory until the monitor is done with its current refresh cycle.

Vsync (short for Vertical Synchronization) is a rendering option for video cards. This option prevents the video card from changing the display memory until the monitor is done with its current refresh cycle.

When vsync is applied, the rendering engine would match the maximum refresh rate of the monitor if the frame rate being produced is higher than the refresh rate of the monitor. This effectively throttles the maximum generated frames per second of the graphics card.

Turning vsync on can improve rendering quality when applied to applications that have frame rates significantly higher than the monitor's refresh rate as this relieves tearing of the image and results in smooth playback. On the other hand if the graphics card is outputting significantly lower frame rates than the monitor's refresh rate, this can result to the video output having judder as the graphics card may miss the monitor's refresh deadlines.

151 questions
41
votes
3 answers

how to enable vertical sync in opengl?

How do you enable vertical sync? Is it something simple like glEnable(GL_VSYNC)? (though there's no such thing as GL_VSYNC or anything like it in the options that glEnable accepts). or is there no standard way to do this in opengl?
hasen
  • 148,751
  • 62
  • 182
  • 223
16
votes
1 answer

Understanding necessity of Android VSYNC signals

I'm trying to get a better understanding of the Android display subsystem, but one item that's still confusing to me is how VSYNC signals are handled, and why so many exist in the first place. Android is designed to use VSYNC at its core, but there…
15
votes
4 answers

Direct3D 11 missing GetRasterStatus, how do I detect the vertical blank period?

I'm updating an application in which measurement of the time of presentation of a stimulus on a screen requires the greatest amount of accuracy. It is currently written with DirectDraw, which got put out to pasture a long while ago, and there's a…
Rob
  • 751
  • 6
  • 8
14
votes
3 answers

How to disable vsync on macOS

With all my SDL/OpenGL programs, the framerate is stuck at 60fps, so looks like the vsync is enable, but not by me, nor in my code or my settings. so i would like to now if there is a way to disable it, maybe in some deep macOS settings?
Nox
  • 832
  • 1
  • 8
  • 24
13
votes
1 answer

How to wait for VSYNC in Xlib app?

I am drawing something on screen using XWindow Drawable, Pixmap, and XRender. I can see that sometimes there is flicker. Is there a way to wait for VBLANK? I googled a lot already, feels like looking for a coin in a forest. There is NO OpenGL…
exebook
  • 27,243
  • 27
  • 105
  • 196
12
votes
1 answer

Enabling VSync in Vulkan

How do I use vsync in Vulkan? I'm on Windows, but the code should also work on Linux. Is it implemented by inserting a fence in vkAcquireNextImageKHR?
SurvivalMachine
  • 7,158
  • 13
  • 53
  • 74
12
votes
6 answers

How to do exactly one render per vertical sync (no repeating, no skipping)?

I'm trying to do vertical synced renders so that exactly one render is done per vertical sync, without skipping or repeating any frames. I would need this to work under Windows 7 and (in the future) Windows 8. It would basically consist of drawing a…
slazaro
  • 248
  • 3
  • 8
9
votes
3 answers

Vsync in Flex/Flash/AS3?

I work on a 2D shooter game with lots of moving objects on the screen (bullets etc). I use BitmapData.copyPixels(...) to render entire screen to a buffer:BitmapData. Then I "copyPixels" from "buffer" to screen:BitmapData. The framerate is…
oshyshko
  • 2,009
  • 2
  • 20
  • 31
9
votes
1 answer

100% CPU utilization when using vsync (OpenGL)

Here is a very simple test program. When vsync is disabled this program runs at 100FPS and uses up virtually 0% of the CPU. When I enable vsync, I get 60FPS and 25% (100% of one core on a 4 core system) CPU utilization. This is using a Nvidia GPU.…
Chris_F
  • 3,780
  • 4
  • 27
  • 44
9
votes
2 answers

Synchronizing multiple OpenGL windows to vsync

In a Windows application, I have multiple OpenGL windows open at the same time. Ideally I would like each of these to draw at 60 fps, synchronized to the screen refresh. For each render context, I'm calling wglSwapIntervalEXT(1) to turn on vsync.…
Frederik Slijkerman
  • 6,246
  • 23
  • 38
8
votes
1 answer

Is there a way to remove 60 fps cap in GLFW?

I'm writting a game with OGL / GLFW in c++. My game is always running at 60 fps and without any screen tearing. After doing some research, it seems that the glfwSwapInterval() function should be able to enable/disable V-sync or the 60fps cap.…
Manu
  • 169
  • 1
  • 2
  • 11
8
votes
2 answers

Performance drop of Android animation when device stays still but is touched

My app changes the properties of some really simple views (rotation, translation) per frame. I used systrace, as advised by Android performance articles, to check if I was dropping frames. Something really unexpected came up. When the device was…
Petrakeas
  • 1,224
  • 10
  • 22
8
votes
2 answers

How to avoid tearing with pygame on Linux/X11

I've been playing with pygame (on Debian/Lenny). It seems to work nicely, except for annoying tearing of blits (fullscreen or windowed mode). I'm using the default SDL X11 driver. Googling suggests that it's a known issue with SDL that X11 provides…
timday
  • 23,811
  • 10
  • 77
  • 132
7
votes
4 answers

How to query Vsync phase in Linux

I need to create a C++ function that will return the number of seconds until the next Vsync interval as a floating point value. Why? I am creating programs that display rectangles that follow the mouse cursor. Ostensibly OpenGL provides a vsync…
personal_cloud
  • 2,846
  • 1
  • 19
  • 25
7
votes
1 answer

CVDisplayLink alternative for Windows?

On Mac OS X, CVDisplayLink provides a great way to reliably update the screen to achieve 60 fps animation without tearing. Is there a similar interface on Windows, compatible with OpenGL? It's of course possible to block while waiting for vsync, but…
Frederik Slijkerman
  • 6,246
  • 23
  • 38
1
2 3
10 11