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. |
This enumeration provides values to identify the possible ways to present a scene. This enumeration is used in the SwapEffectmember of the D3DMPRESENT_PARAMETERSstructure.
Syntax
typedef enum _D3DMSWAPEFFECT { D3DMSWAPEFFECT_DISCARD = 1, D3DMSWAPEFFECT_FLIP = 2, D3DMSWAPEFFECT_COPY = 3, D3DMSWAPEFFECT_COPY_VSYNC = 4, D3DMSWAPEFFECT_FORCE_ULONG = 0x7fffffff, } D3DMSWAPEFFECT; |
Elements
- D3DMSWAPEFFECT_DISCARD
-
Indicates a presentation method used as a performance mechanism because it makes no assumptions regarding the contents of the discarded back buffer. After the back buffer is copied to the screen its contents is undefined. This presentation method is only evident in debug builds of Direct3D Mobile. The copy operation is synchronized with the vertical retrace.
- D3DMSWAPEFFECT_FLIP
-
Indicates that the front and back buffers are swapped. This operation is performed during the vertical retrace period. Also, this operation requires that the front and back buffers have the same dimensions and pixel formats. This presentation method is not allowed if the application specifies multisampling antialiasing.
- D3DMSWAPEFFECT_COPY
-
Indicates that the back buffer is copied to the front buffer. The source and destination rectangle parameters to the IDirect3DMobileDevice::Presentcall can be used to specify rectangles to move. If the rectangles are not the same size, the back buffer image is shrunk or stretched to fit. The copy operation is performed as soon as possible, and not synchronized with the vertical sync.
- D3DMSWAPEFFECT_COPY_VSYNC
-
Indicates a presentation method identical to D3DMSWAPEFFECT_COPY, except the copy operation is performed during the vertical retrace period.
- D3DMSWAPEFFECT_FORCE_ULONG
-
Forces the compiler to interpret the enumeration as a ULONG value. This value is not used directly in Direct3D Mobile programming.
Remarks
All operations that are synced with the vertical retrace period respect the FullScreen_PresentationIntervalmember of the D3DMPRESENT_PARAMETERSstructure. If that structure member is set to 0, then an interval of 1 is assumed.
The state of the back buffer after a call to IDirect3DMobileDevice::Presentis well-defined by each of these swap effects, and whether the Microsoft® Direct3D Mobile® device was created with a full-screen swap chain or a windowed swap chain has no effect on this state.
In particular, the D3DMSWAPEFFECT_FLIP swap effect operates the same whether windowed or full-screen, and the Direct3D Mobile middleware guarantees this by creating extra buffers. As a result, it is recommended that applications use D3DMSWAPEFFECT_DISCARD whenever possible to avoid any such penalties. This is because this swap effect will always be the most efficient in terms of memory consumption and performance.
Requirements
Header | d3dmtypes.h |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |