Check for vSync on/off with DirectX

Posted on 2005-04-24
Medium Priority
Last Modified: 2013-12-08

I understand I can set vSync usage (on/off) by DirectX when creating the device (e.g., IDirect3D9::CreateDevice, Parameter D3DPRESENT_PARAMETERS). But this would be overwritten by driver settings, right ? Like, vSync is set to "on" during CreateDevice (full screen app), but the driver has it set to off by the user, thus my game will not use vsync on presentation.

Is there a possibility to check if my Device really runs with vSync turned on or off ?

Thank you.
Question by:MiKo93
LVL 17

Accepted Solution

davebytes earned 1000 total points
ID: 13919071
You're entering a gray area... ;)

I don't believe there are any methods in DX or GL for detecting the current VSYNC state of the device, just for telling the driver what state you'd PREFER.  If a hard-core game player goes into the driver control panel, advanced settings, and force-overrides the driver to never (or always) VSYNC, that's the USER'S PREFERENCE.  In theory, you shouldn't be able to override it.  Those options were put in for games that say didn't VSYNC but users wanted them to (on really fast machines, to avoid tearing at the cost of FPS), or for games that always locked VSYNC but the users didn't want it (in games that chew up CPU/GPU, and disabling VSYNC gains you FPS in performance with some slight tearing).

In the old days, vsync was something that you did, not the drivers (the real, real old days).  There's obviously always a vsync, it's whether the driver waits to page-flip for the vretrace to begin -- and with most modern cards, there's just a bit that tells the card when it goes to retrace, do a flip that's been queued up...

This is the battle between programmers wanting to know how things look/work on a user's system, and a user wanting control over their OWN system. ;)


Author Comment

ID: 13920744
davebytes, thank you for clearing that up

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question