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
ofSetVerticalSync(true);
ofSetFrameRate(50);
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
not sure about the Fullscreen part, but I noticed that ofSetVerticalSync(true); simply does not work on some windows machines. I had to use wglSwapIntervalEXT(1);
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.
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