D3DPRESENTFLAG

Constants used by D3DPRESENT_PARAMETERS.

#defineValueDescription
D3DPRESENTFLAG_DEVICECLIP0x00000004Clip a windowed Present blit into the window client area, within the monitor screen area of the video adapter that created the Direct3D device. D3DPRESENTFLAG_DEVICECLIP is not valid with D3DSWAPEFFECT_FLIPEX.
D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL0x00000002Set this flag when the device or swap chain is created to enable z-buffer discarding. If this flag is set, the contents of the depth stencil buffer will be invalid after calling either Present, or SetDepthStencilSurface with a different depth surface.

Discarding z-buffer data can increase performance and is driver dependent. The debug runtime will enforce discarding by clearing the z-buffer to some constant value after calling either Present, or SetDepthStencilSurface with a different depth surface.

Discarding z-buffer data is illegal for all lockable formats, D3DFMT_D16_LOCKABLE and D3DFMT_D32F_LOCKABLE. Any use of CreateDevice specifying a lockable format and z-buffer discarding will fail. For more information about formats, see D3DFORMAT.

D3DPRESENTFLAG_LOCKABLE_BACKBUFFER0x00000001Set this flag if the application requires the ability to lock the back buffer directly. Note that back buffers are not lockable unless the application specifies D3DPRESENTFLAG_LOCKABLE_BACKBUFFER when calling CreateDevice or Reset. Lockable back buffers incur a performance cost on some graphics hardware configurations.

Performing a lock operation (or using UpdateSurface to write) on the lockable back buffer decreases performance on many cards. In this case, consider using textured triangles to move data to the back buffer.

Differences between Direct3D 9 and Direct3D 9Ex:In Direct3D9Ex this flag cannot be set if the D3DSWAPEFFECT is D3DSWAPEFFECT_FLIPEX, since the flip model enables the Desktop Window Manager to access an application's back buffer. A cross-process shared-surface should not be locked.

 

D3DPRESENTFLAG_NOAUTOROTATE0x00000020Rotated monitors are handled automatically with a rotating copy during presentation, which is not very efficient. This flag means the application will perform it's own display rotation.
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

Applications can achieve their own rotation possibly by using a rotated view matrix. The methods GetDisplayModeEx and GetAdapterDisplayModeEx should be used to to find the current rotation setting. The backbuffer Width and Height parameters in CreateDeviceEx and ResetEx must be use landscape orientation, while the fullscreen display mode structure should be the same as what is returned from EnumAdapterModesEx (i.e. Width and Height are swapped when rotated 90 and 270 degrees).

When using Lock on rotated render targets, upper-left corner assumptions no longer hold true, the render target SURFACE_DESC will remain landscape (as implied by the creation parameters), and GDI window, mouse coordinates, and such need to be properly translated when used with the Direct3D render target and scene.

D3DPRESENTFLAG_UNPRUNEDMODE0x00000040Use this flag to specify any RAW display mode enumerated by the display adapter even though Direct3D may have indicated the mode is invalid. The application should implement this in a robust manner in case the desired mode really is invalid.
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

D3DPRESENTFLAG_VIDEO0x00000010This is a hint to the driver that the back buffers will contain video data.
D3DPRESENTFLAG_OVERLAY_LIMITEDRGB0x00000080Specifies whether the overlay is full range RGB or limited range RGB. Setting this flag indicates limited range RGB. In limited range RGB, the RGB range is compressed such that 16:16:16 is black and 235:235:235 is white.
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

D3DPRESENTFLAG_OVERLAY_YCbCr_BT7090x00000100Specifies whether the overlay is BT.601 or BT.709. Setting this flag indicates BT.709, for high-definition TV (HDTV).
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

D3DPRESENTFLAG_OVERLAY_YCbCr_xvYCC0x00000200Specifies whether the overlay is conventional YCbCr or extended YCbCr (xvYCC). Setting this flag indicates extended YCbCr (xvYCC).
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

D3DPRESENTFLAG_RESTRICTED_CONTENT0x00000400Setting this flag indicates that the swapchain contains protected content and automatically causes the runtime to restrict access to the swapchain so that only the Desktop Windows Manager (DWM) can use the swapchain.
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER 0x00000800Setting this flag indicates that the driver should restrict access to any shared resources that are created for DWM interaction. The caller must create an authenticated channel with the driver. The driver should then allow access to processes that attempt to open those shared resources.
Differences between Direct3D 9 and Direct3D 9Ex:This flag is available in Direct3D 9Ex only.

 

 

These constants are used by D3DPRESENT_PARAMETERS.

Constant Information

Headerd3d9types.h
Minimum operating systemWindows 98

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.