Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > dotnet framework > april 2008 >

dotnet framework : catching VSYNC or BLANK


MarcG
4/18/2008 1:31:00 PM
Is it possible to catch these video signals from C#? I want to control
internal task timing with display updates.

Thx
Jeroen Mostert
4/18/2008 11:14:50 PM
[quoted text, click to view]
Not directly, but you can use unmanaged functionality. Getting the refresh
rate can be done by p/invoking to EnumDisplaySettings(). Synchronizing with
the vertical blank can be done through IDirectDraw::WaitForVerticalBlank().

In regards to the latter, there are several projects that expose DirectX to
C#, including Microsoft's own MDX, and the independent SlimDX. MDX is
discontinued, but MDX 1.1 is still available in the August 2007 DirectX SDK.
That said, I have no experience using these libraries and I don't know if
they expose the necessary functionality.

--
J.
AddThis Social Bookmark Button