Vertical sync problem



I have done a little video player. the videos runs in 25 frames/second. the videos change via udp input from an rfid interface. I got tearing effects in fullscreen mode. I think this shouldn’t be a problem on a normal i7 with onboard graphic.

in my setup I have

and a simple draw
loopVideo.draw(0, 0, 1920, 1080);

when I start the video I got some tearing on a Intel HD grafics 530. How can I prevent this. I am using 0.9.8



I guess you need a better performance, at least 30 fps to have a proper VerticaSync working.

Could you use another VideoPlayer? There are many options right now.

or just use a lighter video ( less bitrate or a lighter codec like H264)?

Also try to remove "
ofSetFrameRate(50)" and let VerticaSync to decide the final fps


the v-sync problem occurs only in fullscreen mode. why?

actually the videos are in h264/mp4 container. which other player I can use with this format?



Dear mindthegap,

not sure about the Fullscreen part, but I noticed that ofSetVerticalSync(true); simply does not work on some windows machines. I had to use
instead, then it worked.

Note that (as charli_e pointed out already) you do not have to use ofSetFrameRate(50); then, as vSync is actually setting the framerate (leads to video refresh rate) to a level that is preventing tearing. The video framerate should not be a problem in theory, all the vSync stuff is about the framerate of your App.

have a good day!


oh, where should I use wglSwapIntervalEXT(1);



ok, it works in the setup

interesting: when starting with ofSetVerticalSync(true) and without the ofSetFrameRate(60); on my machine it loops with 60 frames, on the problematic machine its plays with 260 and above…

when using wglSwapIntervalEXT(1); it plays although with 60 fps.


Sorry for forgetting. You can actually use wglSwapIntervalEXT(1); exactly as ofSetVerticalSync(true);

The framerate can be used as a check. If it is high as you describe, it shows, that vertical sync is not working/active on the appropriate machine. If it is working, you get framerate like 60 (or 30)…


@dasoe have you tried if this is still a problem with the nightly builds? would be useful to add this fix in the next release if it’s still not working on some mochines


now I did some tweeks on the intel hd graphics, no v-sync problem, but no video fade out? uuuuaaaah.