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
2
votes
1 answer

OpenGL window systems screen tearing prevention

in my OpenGL application I want to prevent screen tearing for obvious reasons. So far I have been using vsync. But I would like to replace it with a page flipping buffer swap (changing a pointer to the monitor's data instead of changing the value)…
SIGKILL
  • 390
  • 1
  • 9
2
votes
0 answers

V-sync in windowed Java applications

I've been hacking on Notch's Ludum Dare 22 entry, Minicraft. It's a 2D action-adventure game written in Java. Although the game runs at 150-200 FPS on my laptop, there's very obvious screen tearing. I'd like to fix that. I have years of programming…
Adam Siler
  • 1,986
  • 5
  • 22
  • 26
2
votes
0 answers

How to fix flickering screen in a Slick game?

I'm writing a simple Mario-like game with the Slick library, and I have problem with the game window flickering. I usually have an Eclipse window below it, and it seems to me that when Eclipse updates its screen, stuff is drawn over my game. When I…
mik01aj
  • 11,928
  • 15
  • 76
  • 119
2
votes
2 answers

Is there anyway to know when the screen has been updated/refreshed (OpenGL or DirectX maybe?)

I currently have an application I'm writing in c# (using .NET) that requires me to start a timer as soon as a user sees an image on screen up until they respond with a key press. Now I realise that practically this is very difficult given the…
aceaudio
  • 23
  • 1
  • 4
1
vote
0 answers

Android GLSurfaceView ~56fps - How to control swap?

When running the basic sample: http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html Add some basic timing using System.currentTimeMillis() or dropping to native code and using clock_gettime(CLOCK_REALTIME_HR, &res) both…
Halsafar
  • 2,540
  • 4
  • 29
  • 52
1
vote
0 answers

Handling VSync with multiple swapchains in directx 12

So I am attempting to write a multi window co-op game using directx12. (each player has their own window to allow no screen cheating if they have multiple monitors). But I am having trouble with dealing with VSync when presenting the swapchains for…
yosmo78
  • 489
  • 4
  • 13
1
vote
1 answer

Strange problem with PIO state machine of RapsberryPi-Pico

I try to implement TFT control using PIO. I have written 4 PIO state machines for every sync signal of my TFT (CLOCK, DE, HSYNC, VSYNC). 3 of them work seamless, but if I add the VSYNC module, the whole Pico freezes. It doesn't change pins and…
1
vote
2 answers

How does animation at 60Hz works?

I'm using a Thread to make a scrolling under Android. The thread run method is classic. I took it on Internet My view is a SurfaceView. public void run() { Canvas canvas = null; while (_run) { canvas = _surfaceHolder.lockCanvas(); …
webshaker
  • 467
  • 6
  • 17
1
vote
0 answers

What the purpose of the frameTimeNanos in the Choreographer.FrameCallback.doFrame

In Choreographer.FrameCallback.doFrame event, their a value called frameTimeNanos. what exactly mean this value and more important how to use it, I mean in with scenario we need to take care of this value?
zeus
  • 12,173
  • 9
  • 63
  • 184
1
vote
1 answer

Create video from PNGs with FFMPEG and variable per image timestamps

I'm trying to take a pile of screenshot PNGs, and the timestamp of each screenshot, and create a video with ffmpeg that recreates the timing of the screenshots. According to the ffmpeg help, -vsync 0 seems to be what I need, -vsync parameter 0,…
Joseph Lust
  • 19,340
  • 7
  • 85
  • 83
1
vote
0 answers

Forcing DirectX 11 VSync, even if turned off in Nvidia control panel

Some users of my DirectX 11 application complains about frame rates between 1000-2000 fps, which I totally understand. It's a really small group of people who have had this issue. The only way I've been able to replicate it is by disabling 'Vertical…
Filip
  • 21
  • 2
1
vote
1 answer

How to dynamically toggle VSync in a Qt application at runtime?

Qt5 allows to use QSurfaceFormat::setSwapInterval which lets the application to decide whether to enable VSync or not. However, this can only be done when the application is started, e.g. to disable VSync it's sufficient to call the following before…
reckless
  • 741
  • 12
  • 53
1
vote
1 answer

FFmpeg convert video to images with complex logic

I'm trying to use FFMPEG in order to solve some complex logic on my videos. The business logic is the following: I get videos from the formats: avi, mp4, mov. I don't know what is the content in the video. It can be from 1M to 5G. I want to output a…
Udi
  • 598
  • 8
  • 19
1
vote
2 answers

marquee (ticker,text scroll) with java2d or javafx stutters

I'm trying to write a smooth ticker (text running from rigth to left on the screen). It is almost as I want it, but there are still some stutters. I would like it to be as smooth as cloud moving in the sky. 30 years ago I managed with a few lines of…
Marc Johnen
  • 379
  • 3
  • 11
1
vote
2 answers

Java VSync without fullscreen window

I'm trying to make my windowed application VSync with the monitor refresh. This code works properly with "fullscreen = true" (reports 75FPS, the monitors refresh rate) but in windowed mode it reports only 32FPS. Anybody know what I'm doing wrong…
Colby
  • 452
  • 4
  • 19