Nvidia: wglSwapInterval ignored when FBO is bound

Platforms:
Vista 64 bit, GeForce 8800 GTX, 197.45
FreeBSD 32 bit, GeForce FX 5200, 173.14.12
FreeBSD 32 bit, GeForce EMP 8, 185.18.29

When calling wglSwapInterval while an FBO is bound this call doesn’t seem to have any effect. The same happens on X11 with glxSwapIntervalSGI. The workaround is easy but I think it’s a bug, isn’t it?

This is not a bug. wglSwapInterval instructs default framebuffer (swap chain) not to wait for vsync. It has no effect on FBO.

The specification says:
“wglSwapIntervalEXT specifies the minimum number of video frame periods per buffer swap for the window associated with the current context.”

So having FBO or not, this API should change swap interval for associated window. FBO extension came after swap interval and they kept the wording intact.

So having FBO or not, this API should change swap interval for associated window. FBO extension came after swap interval and they kept the wording intact.

FBO cannot extend WGL/GLX, so it cannot modify the wording without being an explicit WGL/GLX extension.

The meaning of these functions is not clear when an FBO is bound, so it’s best not to leave yourself open to such things. It may in fact be something NVIDIA wants to correct, but it’s probably cleaner code to just bind the default framebuffer when you try to do these kinds of things.

Yes. As I wrote it’s easy to avoid this but it took me several hours until I realized what the problem was. SwapInterval should not care about FBOs (as SwapBuffers already does). But even if this is never fixed this thread can be helpful for others haveing the same problem.

Of course not. But every vivid extension undergoes some maintenance. It has revision history. They can clarify things. I also feel that this issue on the edge. I am OK if they add note that the extension only works when FBO is not bound.

Thanks to muhkuh we can avoid this trap (at least on NV).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.