Registers the application to be notified on VLine or VBlank events.
HRESULT DXGIXSetVLineNotification(
DXGIX_VLINECOUNTER VLineCounter,
UINT32 VLineNumber,
HANDLE hEvent
)
VLineCounter
Type: DXGIX_VLINECOUNTER
[in] The vertical line counter to use, as a DXGIX_VLINECOUNTER enumeration constant.
VLINECOUNTER0 does not support notifications on arbitrary VLines, so VLineNumber must be specified as zero when VLINECOUNTER0 is used. Line number 0 is the start of the vertical blanking interval, so VLINECOUNTER0 serves as a VBlank notification.
VLINECOUNTER1 can be used for notifying arbitrary VLines starting from 0 up to 1124 specified using the parameter VLineNumber.
VLineNumber
Type: UINT32
[in] The vertical line number. The 1080p display mode has 1125 vertical lines, out of which the first 45 lines are during the vertical blanking interval. When the display is in a different mode, such as 720p or 480p, the application still needs to specify a number between 0 and 1125. The API will convert this internally to a line number more appropriate for the current mode.
hEvent
Type: HANDLE
[in] An event that gets Set when the display reaches the specified line number. The event is typically created using CreateEvent or CreateEventEx. This can be a manually resettable or auto-resetting event. The system will set the event continually, as long as the raster scan is active until the application exits, or until notification is turned off by setting hEvent to NULL. If you specify a different hEvent from the one previously specified, the system will stop notifying using the previous event, and will continuously notify using the new event.
Type: HRESULT
This method returns one of the Direct3D 11 return codes.
This function can be used by an application to register to be notified on VLine or VBlank events. Up to two notifications can be simultaneously registered, specified by VLineCounter.
There is a matching function pointer, PFN_DXGIX_SET_VLINE_NOTIFICATION, declared as follows:
typedef HRESULT (D3DAPI *PFN_DXGIX_SET_VLINE_NOTIFICATION)(
_In_ DXGIX_VLINECOUNTER VLineCounter,
_In_ UINT32 VLineNumber,
_In_ HANDLE hEvent
);
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.