Registers the application to be notified on frame events.
HRESULT DXGIXSetFlipNotification(
DXGIX_FRAME_NOTIFICATION NotificationType,
HANDLE hEvent
)
NotificationType
Type: DXGIX_FRAME_NOTIFICATION
[in] The type of notification to receive, as a DXGIX_FRAME_NOTIFICATION enumeration constant.
The queued notification is signaled when a frame is queued. It can be used to determine CPU stalls (if any) after DXGIXPresentArray due to the present queue being full. The CPU time line portion of the frame’s DXGIX_FRAME_STATISTICS structure is guaranteed to be valid after this event is signaled.
The completed notification is signaled when the GPU is finished rendering a frame. The GPU time line portion of the frame’s DXGIX_FRAME_STATISTICS structure is guaranteed to be valid after this event is signaled.
The flipped notification is signaled when a frame is flipped to be displayed out. The Display time line portion of the frame’s DXGIX_FRAME_STATISTICS structure is guaranteed to be valid after this event is signaled.
hEvent
Type: HANDLE
[in] A handle to the event that will be set.
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 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.
There is a small delay between when the frame is completed or flipped and when the when the associated event is signaled. The exact time of the frame completion or flip along with other information can be queried using DXGIXGetFrameStatistics.
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.