catching VSYNC or BLANK

  • Thread starter Thread starter MarcG
  • Start date Start date
M

MarcG

Is it possible to catch these video signals from C#? I want to control
internal task timing with display updates.

Thx
Marc
 
MarcG said:
Is it possible to catch these video signals from C#? I want to control
internal task timing with display updates.
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.
 
Back
Top