# OpenGL vsync with SDL in Vista

**URL:** <https://discourse.libsdl.org/t/opengl-vsync-with-sdl-in-vista/15845>\
**Category:** SDL Development\
**Created:** [December 4, 2008, 12:05pm UTC](https://discourse.libsdl.org/t/opengl-vsync-with-sdl-in-vista/15845 "2008-12-04T12:05:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Anthony](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/stephen_anthony/32/2866_2.png) [@Stephen\_Anthony](https://discourse.libsdl.org/u/Stephen_Anthony)\
**Post date:** [December 4, 2008, 12:05pm UTC](https://discourse.libsdl.org/t/opengl-vsync-with-sdl-in-vista/15845/1 "2008-12-04T12:05:22Z")

</div>

I’m researching some problems with SDL OpenGL and Vista that I’m having.  
Specifically, vsync doesn’t seem to work at all in windowed mode, and  
doesn’t seem to be working the best in fullscreen either. And the CPU  
usage jumps to 26-27% on a Q6600 @ 3GHz, but when I turn vsync off, CPU  
usage drops to 1-2%.

Here’s the relevant stats for my development system:

Q6600 CPU @ 3GHz  
4 GB RAM  
Vista Business 64-bit  
Nvidia 9600GT with latest drivers  
Vista rating of 5.9

I should add that in Linux (both Mandriva and Kubuntu), the CPU usage  
stays low in OpenGL vsync mode, and vsync actually works (nice smooth  
updates, no tearing, etc). And the same code runs just as smooth in OSX  
as well. I’m not using any advanced OpenGL features at all. Basically  
just glTexSubImage2D for a 320x240 window (sometimes scaled larger, but  
still only using 320x240 of data).

Does the SDL GL swap interval functionality not work in Vista? Or is it  
strictly a Vista issue?? I haven’t tried it in WinXP on this system,  
but I don’t recall having the issue with XP on other systems.

So, can anyone offer any advice? Is it an SDL problem, OpenGL, Vista,  
my code, etc? Any suggestions on how to fix this?

Sorry for the long email, and thanks in advance for any info you can  
provide. Also, I’m not interested in responses saying that Vista is  
crap, and to drop back to XP. Like it or not, Vista is here, and it  
isn’t going away (although I wish it would). I personally don’t use it,  
but quite a few of my end-users do. And I need to fix the issues I’m  
having.

Thanks,  
SA
