Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The IDirectDrawSurface5::Flipmethod makes the surface memory associated with the DDSCAPS_BACKBUFFER surface become associated with the front-buffer surface.
HRESULT Flip( LPDIRECTDRAWSURFACE5 lpDDSurfaceTargetOverride , DWORD dwFlags );
Parameters
DDFLIP_EVEN | For use only when displaying video in an overlay surface. The new surface contains data from the even field of a video signal. This flag cannot be used with the DDFLIP_ODD flag. | ||
DDFLIP_INTERVAL2
DDFLIP_INTERVAL3 DDFLIP_INTERVAL4 | These flags indicate how many vertical retraces to
wait between each flip. The default is 1. DirectDraw will return
DERR_WASSTILLDRAWING for each surface involved in the flip until
the specified number of vertical retraces has occurred. If
DDFLIP_INTERVAL2 is set, DirectDraw will flip on every second
vertical sync; if DDFLIP_INTERVAL3, on every third sync; and if
DDFLIP_INTERVAL4, on every fourth sync.
These flags are effective only if DDCAPS2_FLIPINTERVAL is set in the DDCAPSstructure returned for the device. |
||
DDFLIP_NOVSYNC | Causes DirectDraw to perform the physical flip as
close as possible to the next scan line. Subsequent operations
involving the two flipped surfaces will not check to see if the
physical flip has finished, that is, they will not return
DDERR_WASSTILLDRAWING for that reason (but may for other reasons).
This check allows an application to perform flips at a higher
frequency than the monitor refresh rate, but may introduce visible
artifacts.
If DDCAPS2_FLIPNOVSYNC is not set in the DDCAPSstructure returned for the device, DDFLIP_NOVSYNC has no effect. |
||
DDFLIP_ODD | For use only when displaying video in an overlay surface. The new surface contains data from the odd field of a video signal. This flag cannot be used with the DDFLIP_EVEN flag. | ||
DDFLIP_WAIT | Typically, if the flip cannot be set up because the state of the display hardware is not appropriate, the DDERR_WASSTILLDRAWINGerror returns immediately and no flip occurs. Setting this flag causes the method to continue trying to flip if it receives the DDERR_WASSTILLDRAWING error from the HAL. The method does not return until the flipping operation has been successfully set up, or another error, such as DDERR_SURFACEBUSY, is returned. |
DDERR_GENERIC |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_NOFLIPHW |
DDERR_NOTFLIPPABLE |
DDERR_SURFACEBUSY |
DDERR_SURFACELOST |
DDERR_UNSUPPORTED |
DDERR_WASSTILLDRAWING |
Remarks
This method can be called only for a surface that has the DDSCAPS_FLIP and DDSCAPS_FRONTBUFFER capabilities. The display memory previously associated with the front buffer is associated with the back buffer.
The lpDDSurfaceTargetOverrideparameter is used in rare cases when the back buffer is not the buffer that should become the front buffer. Typically this parameter is NULL.
The IDirectDrawSurface5::Flipmethod will always be synchronized with the vertical blank. If the surface has been assigned to a video port, this method updates the visible overlay surface and the video port's target surface.
Requirements
Runs on | Versions | Declared in | Link to |
---|---|---|---|
Windows CE OS | 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. | ddraw.h | ddraw.lib |
See Also
IDirectDrawSurface5::GetFlipStatus