D3DDDIARG_CREATERESOURCE structure (d3dukmdt.h)

The D3DDDIARG_CREATERESOURCE structure contains information for creating a resource.

Syntax

typedef struct _D3DDDIARG_CREATERESOURCE {
  [in]     D3DDDIFORMAT                   Format;
  [in]     D3DDDI_POOL                    Pool;
  [in]     D3DDDIMULTISAMPLE_TYPE         MultisampleType;
  [in]     UINT                           MultisampleQuality;
  [in]     const D3DDDI_SURFACEINFO       *pSurfList;
  [in]     UINT                           SurfCount;
  [in]     UINT                           MipLevels;
  [in]     UINT                           Fvf;
  [in]     D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
  [in]     D3DDDI_RATIONAL                RefreshRate;
  [in/out] HANDLE                         hResource;
  [in]     D3DDDI_RESOURCEFLAGS           Flags;
  [in]     D3DDDI_ROTATION                Rotation;
} D3DDDIARG_CREATERESOURCE;

Members

[in] Format

A D3DDDIFORMAT-typed value that indicates the format of the resources.

[in] Pool

A D3DDDI_POOL-typed value that indicates the type of memory pool that the resources are created from.

[in] MultisampleType

A D3DDDIMULTISAMPLE_TYPE-typed value that indicates the number of samples for a multiple-sampled surface. If the surface is not multiple sampled, this value is D3DDDIMULTISAMPLE_NONE (0).

[in] MultisampleQuality

The quality level of rendering samples in a multiple-sampled surface. The quality level must be a number from 0 through 7 that represents a quality level from 1 through 8, respectively.

Note that even if the surface is not multiple-sampled (that is, if D3DDDIMULTISAMPLE_NONE is specified in MultisampleType) it can still have a quality level that is greater than 1 (which is specified by using a number greater than 0).

[in] pSurfList

An array of D3DDDI_SURFACEINFO structures for the list of surfaces (or other resource types) to create.

[in] SurfCount

The number of resources in the array that is specified by the pSurfList member.

[in] MipLevels

The number of MIP-map levels for the resources.

[in] Fvf

The FVF format for vertex buffers.

[in] VidPnSourceId

The zero-based identification number of the video present source in a path of a video present network (VidPN) topology that the primary surface is created on (if the resource contains a primary surface).

[in] RefreshRate

A D3DDDI_RATIONAL structure that specifies the refresh rate that the resource is used with. This member is applicable only if the resource is the primary surface and the MatchGdiPrimary bit-field flag is not set in the Flags member. In addition, if the InterlacedRefresh bit-field flag is set in Flags, the user-mode display driver determines that the refresh rate is interleaved (otherwise, progressive).

[in/out] hResource

A handle to the resource. On input to the CreateResource function, hResource specifies the handle that the driver should use anytime it calls back into the Microsoft Direct3D runtime.

The driver generates a unique handle and passes it back to the Direct3D runtime. On output from the CreateResource function, hResource specifies the handle that the Direct3D runtime should use in subsequent driver calls to identify the resource.

[in] Flags

A D3DDDI_RESOURCEFLAGS structure that identifies the type of resources to create. Note that some of the bit-field flags in D3DDDI_RESOURCEFLAGS require that additional bit-field flags are set as well.

[in] Rotation

A D3DDDI_ROTATION-typed value that identifies the orientation of the resource.

For example, consider that the user-mode display driver receives a request for a 480x640 surface to be rotated 90 degrees (D3DDDI_ROTATION_90). The driver should allocate the surface in 640x480 mode for scanning purposes. When rendering to the surface, the driver should perform the 90 degree rotation.

Orientations other than D3DDDI_ROTATION_IDENTITY are set only when the Primary bit-field flag is also set in the Flags member.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header d3dukmdt.h (include D3dumddi.h, D3dkmddi.h)

See also

CreateResource

D3DDDIFORMAT

D3DDDIMULTISAMPLE_TYPE

D3DDDI_POOL

D3DDDI_RATIONAL

D3DDDI_ROTATION

D3DDDI_SURFACEINFO