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.

155 questions
7
votes
2 answers

glXSwapBuffers() blocks until vblank

While trying to make a compositing window manager for X11 using OpenGL as backend, I'm caught in a nasty situation where glXSwapBuffers() blocks until vblank rendering the compositor irresponsive to X events which causes windows being dragged around…
wildptr
  • 107
  • 1
  • 7
7
votes
2 answers

What is VSync count in Unity3D?

What is the theoretical concept of VSync, and how does it affect rendering?
Ankush
  • 2,405
  • 3
  • 22
  • 45
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,471
  • 28
  • 39
6
votes
0 answers

How to prevent screen tearing with OpenGL + GLFW?

I am working on a graphical application that supports multiple operating systems and graphical back ends. The window is created with GLFW and the graphics API is chosen at runtime. When running the program on windows and using OpenGL, Vsync seems to…
Lambda
  • 133
  • 1
  • 13
5
votes
2 answers

How can I get vsync callback on HTML5 canvas?

How can I vsync callback on HTML5 canvas?
eonil
  • 83,476
  • 81
  • 317
  • 516
5
votes
3 answers

To use or not to use VSync

I'm deciding on whether or not to use VSync for a new game that I've been developing using OpenGL. The goal is to provide the user with the best gaming experience, and to have a good balance between performance and quality. This game is designed to…
bbosak
  • 5,353
  • 7
  • 42
  • 60
5
votes
1 answer

Android display VSYNC signal is highly erratic

I'm investigating frame drops in my Android app. They are irregular and happen around once a second on average. I have paired back the renderer in question to a very simple shader and I'm confident that frame render time is short. When I run…
Rupert Rawnsley
  • 2,622
  • 1
  • 29
  • 40
5
votes
2 answers

What is VSYNC in android

This explains VSYNC, but the pace is very fast, and i am unable to find any other good resource to understand this topic. What i have understand is this; VSYNC happens at every 16ms, and all of the frame components INPUT ANIMATION LAYOUT RECORD…
dev90
  • 7,187
  • 15
  • 80
  • 153
5
votes
5 answers

How to enable VSYNC in D3D windowed app?

So, Im using D3D in a windowed application. I inited D3D with the following parameters: windowed: true; backbufferformat: D3DFMT_X8R8G8B8; presentinterval: D3DPRESENT_INTERVAL_ONE; swapeffect: DISCARD Each time OnPaint is called, I render the image…
St. KG
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

Screen tearing using pygame on Raspberry Pi

I am stuck on a screen tearing problem for about a week now. Here is my problem: I would like to make a program that can display a sequence of PNG pictures really fast (at a rate of 30 fps or more). To do this I use the pygame library, especially…
Chumbucket
  • 53
  • 1
  • 4
5
votes
2 answers

Pygame Screen tearing when moving line across screen

I am trying to move this image: Across my PyGame screen, from right to left and back again, However as the image moves, every second or so I have a flicker of screen tear make its way up the image like so: The code I am using is a loop similar to…
Aphire
  • 1,621
  • 25
  • 55
5
votes
2 answers

What can I do inside CompositionTarget.Rendering?

The CompositionTarget.Rendering event is the perfect thing to build a game's main loop upon. It basically fires at the rate of vsync (usually 60 Hz). Occurs just before the objects in the composition tree are rendered. The Rendering event is routed…
Ansis Māliņš
  • 1,684
  • 15
  • 35
5
votes
0 answers

Direct3D 10 vsync issue in window mode with DWM disabled

I've got a problem with vsync on Direct3D 10 in window mode with DWM disabled. We have an application, that render and present some output. It have to work in window mode and it have to produce stable 60 fps minimum. One version of application is…
nicolausYes
  • 633
  • 8
  • 33
4
votes
0 answers

High CPU usage with VSYNC turned ON in Opengl and SDL2 application

In this simple triangle drawing application made with opengl3.3 and sdl2, the cpu's usage shoots up to 50+% with vsync enabled. The vsync is enabled using SDL_GL_SetSwapInterval( 1 ). When i remove the vsync by setting the previous function to 0 and…
Ash
  • 131
  • 1
  • 7
4
votes
1 answer

Is there a programmatic way to change vsync at runtime in Haxe/Starling?

I see a way to do so through project.xml but I'm not seeing a way to disable/enable vsync at runtime (like for example having an option in a settings menu or something). Searching hasn't given me any answers. :(
tson
  • 43
  • 2
1
2
3
10 11