The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL + OpenGL, inconsistent VSync. NVidia card.
ShiroAisu


Joined: 09 Jun 2010
Posts: 42
I'm writing with SDL and OpenGL, and I have an NVidia graphics card. For some reason, VSync is all messed up. I cannot even explain it well. Sometimes the card forces Vsync on me, and sudenly it stops doing so. It isn't consistent at all, and it changes from having VSync on and off from minute to minute. Also, restarting the program does nothing, if it was previously "VSynced" it keeps being like that until it randomly changes. I've tried switching VSync off and on in my driver settings and both settings behave the same. I wouldn't mind much if it just forced VSync and that's it, but it is just an inconsistent mess. I've tried all the combinations of SDL calls to set the VSync options and driver options, and nothing seems to stick.

What I've been trying to use in SDL is SDL_GL_SetSwapInterval. The first time I used it it worked, but after a while the program returned to VSync mode and the function did nothing anymore, not even if I restarted the program.

This is happening in windowed mode, and I want my program to preferably NOT have VSync.

I'm sorry if the explanation is a mess, but so is the problem. I'm really lost here.
SDL + OpenGL, inconsistent VSync. NVidia card.
Daniel Gibson
Guest

Could it be
http://www.geforce.com/hardware/technology/adaptive-vsync/technology ,
possibly enforced by the driver?
As far as I understand it, it enforcese vsync if you get >=60fps, but
not if you're below, so you can have e.g. 40fps instead of 30 (with
normal vsync to 60fps).

Cheers,
Daniel

On 02/27/2015 07:58 PM, ShiroAisu wrote:
Quote:
I'm writing with SDL and OpenGL, and I have an NVidia graphics card. For
some reason, VSync is all messed up. I cannot even explain it well.
Sometimes the card forces Vsync on me, and sudenly it stops doing so. It
isn't consistent at all, and it changes from having VSync on and off
from minute to minute. Also, restarting the program does nothing, if it
was previously "VSynced" it keeps being like that until it randomly
changes. I've tried switching VSync off and on in my driver settings and
both settings behave the same. I wouldn't mind much if it just forced
VSync and that's it, but it is just an inconsistent mess. I've tried all
the combinations of SDL calls to set the VSync options and driver
options, and nothing seems to stick.

What I've been trying to use in SDL is SDL_GL_SetSwapInterval. The first
time I used it it worked, but after a while the program returned to
VSync mode and the function did nothing anymore, not even if I restarted
the program.

This is happening in windowed mode, and I want my program to preferably
NOT have VSync.

I'm sorry if the explanation is a mess, but so is the problem. I'm
really lost here.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: SDL + OpenGL, inconsistent VSync. NVidia card.
ShiroAisu


Joined: 09 Jun 2010
Posts: 42
Daniel Gibson wrote:
Could it be
http://www.geforce.com/hardware/technology/adaptive-vsync/technology ,
possibly enforced by the driver?

That's cool and all but I SPECIFICALLY have VSync set to off in the drivers options. The option to turn on adaptive-vsync is also a thing, so I doubt it would be enforced just by default. I even created an exception for my program, and set it, once again, as off. I tried getting control with wglSwapIntervalEXT() but it didn't change a thing.