Blt
Expand Minimize

GetCaps routine

The GetCaps function queries for capabilities of the graphics adapter.

Syntax


PFND3DDDI_GETCAPS GetCaps;

__checkReturn HRESULT APIENTRY GetCaps(
  _In_     HANDLE hAdapter,
  _Inout_  const D3DDDIARG_GETCAPS *pData
)
{ ... }

Parameters

hAdapter [in]

A handle that identifies the graphics adapter.

pData [in, out]

A pointer to a D3DDDIARG_GETCAPS structure that describes the capabilities to retrieve.

Return value

GetCaps returns one of the following values:

Return codeDescription
S_OK

The capabilities were successfully retrieved.

E_OUTOFMEMORY

GetCaps could not allocate the required memory for it to complete.

 

Remarks

The data that is returned by the GetCaps function in the pData member of the D3DDDIARG_GETCAPS structure depends on the type of data that is requested (that is, the data depends on the Type member of D3DDDIARG_GETCAPS and sometimes on the pInfo member).

Here are examples of how to set up the GetCaps call depending on the value of D3DDDIARG_GETCAPS.Type.

D3DDDIARG_GETCAPS memberMember value—Example 1Member value—Example 2
TypeD3DDDICAPS_DDRAWD3DDDICAPS_GETFORMATCOUNT
pInfo[in] NULL (no conditions are set)[in] NULL (no conditions are set)
pData[out] DDRAW_CAPS* (unique pointer)[out] UINT* (unique pointer)
DataSizesizeof(DDRAW_CAPS)sizeof(UINT)
NotesDriver must fill in the DDRAW_CAPS structure pointed to by pData with Microsoft DirectDraw capabilities that it supports.Driver must fill the buffer pointed to by pData with a UINT value that represents the number of D3DDDIFORMAT surface formats that the device supports.

 

See the D3DDDIARG_GETCAPS enumeration topic for explanations of other values for D3DDDIARG_GETCAPS.Type that are used for multiplane overlays.

Simple instancing

If a Microsoft Direct3D Level 9 driver that supports Windows Display Driver Model (WDDM) 1.3 and later completes a call to GetCaps and returns S_OK but doesn't change the data in the D3DDDIARG_GETCAPS structure, it indicates to the Direct3D runtime that the hardware and driver don't support simple instancing. For more info, see D3DDDICAPS_SIMPLE_INSTANCING_SUPPORT.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dumddi.h (include D3dumddi.h)

See also

D3DDDI_ADAPTERFUNCS
D3DDDIARG_GETCAPS
D3DDDICAPS_SIMPLE_INSTANCING_SUPPORT
D3DDDIFORMAT
DDRAW_CAPS

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft