I think this will answer your question. (http://www.sfml-dev.org/faq.php#graphics-vsync-framelimit)
So, do you mean that setVerticalSyncEnabled(true) doesn't work as expected? If so, check your graphics driver settings, they can force it to on no matter what you do in your app.
And I have no idea what you're trying to tell us with your low-level technical considerations, SFML just uses the corresponding OpenGL call for v-sync, which is in turn a direct call to the driver.
And I have no idea what you're trying to tell us with your low-level technical considerations, SFML just uses the corresponding OpenGL call for v-sync, which is in turn a direct call to the driver.
In terms of synchronization it works as expected - buffer swap is really synchronizedI may be wrong, but I don't think you can experience screen tearing in windowed mode anyway. So how can you be sure that it is active?
Could you please help me to find on how exactly vblank sync is implemented in SFML?Follow the call in source code :P
I may be wrong, but I don't think you can experience screen tearing in windowed mode anyway. So how can you be sure that it is active?
Have you checked your driver settings as I suggested?
It's strange I used to think that if I don't touch SetFramerateLimit, then it's should be disabled by default.Yes, should be. I see that you're using SFML.Net, this might be a bug in the binding.
So you don't do as we suggest and wonder why it doesn't work. ::)
Checking your driver settings doesn't mean checking some random applications behavior, it means to open up the control panel of your GPU driver; for AMD that would be called Catalyst.
Additionally you should not be using both VSync and framerate limit. Plus are you using SFML 1.6? Otherwise the function use camelCase spelling.
And last but not least you should limit your framerate. Your monitor's refresh rate is around 60 Hz anyways, so anything above it, is wasted energy.
vertical synchronization was necessary and still exists today. In the future however, it will become less and less of an issue and at some point, vertical synchronization will no longer be necessary
I'm using nVidia GeForce GTX460My UI is in french so sorry if the translation is not accurate... but:
In opposite, SetFrameLimit is completely useless because it grows up CPU usage at about 40x times (4000%), also it causes movement jerky and stress overall system by making extremely high CPU load with no result (just burns CPU time in idle loop and prevents other threads to do useful job).Framerate limit puts the thread (that calls window.Display()) to sleep, it doesn't use a busy-wait loop.
vblank sync is a standard way to set frame limit and actually FAQ has big mistakeI don't know who wrote that, but I agree. If it's part of the official FAQ, then it should be removed, or someone explains me why it's true ;)
QuoteI'm using nVidia GeForce GTX460My UI is in french so sorry if the translation is not accurate... but:
In nVidia control panel > Manage 3D parameters > Vertical synchronization
... you can control how the driver applies vertical synchronization (on, off, half-rate, let app decide).
QuoteIn opposite, SetFrameLimit is completely useless because it grows up CPU usage at about 40x times (4000%), also it causes movement jerky and stress overall system by making extremely high CPU load with no result (just burns CPU time in idle loop and prevents other threads to do useful job).Framerate limit puts the thread (that calls window.Display()) to sleep, it doesn't use a busy-wait loop.
You should not make such assumptions without actually checking what happens under the hood.
I'm always using "Use the 3D application settings"Ok, now at least it is clear.
If its designed to make frame skip, it has a bug. Because when I'm trying to use it, my application starts to consume 2 of 4 CPU cores with 100% load on each core. I don't think that it may be called "sleep"It's implemented with a direct call to the underlying OS sleep function. Nothing more.
vblank sync is a standard way to set frame limit and actually FAQ has big mistake in the following quote:If you quote the FAQ quote the full paragraph not just a excerpt from the middle of a sentence.Quotevertical synchronization was necessary and still exists today. In the future however, it will become less and less of an issue and at some point, vertical synchronization will no longer be necessary
vblank sync is the single way to synchronize graphics and make it smooth, and it will not be "no longer be necessary" in future ;)
In an ideal scenario, the monitor would be sent a new set of data exactly once every refresh, right before the beams start traveling. This would mean that the GPU is synchronized with the monitor, as it delays updating the framebuffer until the beams are at the starting position. If the framebuffer would be changed while the beams are mid-way through the screen, you would see half of the old image and half of the new one. This is known as tearing and is the primary purpose why vertical synchronization was necessary and still exists today. In the future however, it will become less and less of an issue and at some point, vertical synchronization will no longer be necessary and support probably removed from newer hardware.
One might argue that the counter point is missing, that is NVIDIA G-Sync, AMD FreeSync and similar will be the future.