Gets a DXGI 1.0 description of an adapter (or video card).
public:
HRESULT GetDesc(
DXGI_ADAPTER_DESC *pDesc
)
pDesc
Type: DXGI_ADAPTER_DESC *
[out] A pointer to a DXGI_ADAPTER_DESC structure that describes the adapter. This parameter must not be NULL. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID in the VendorId, DeviceId, SubSysId, and Revision members of DXGI_ADAPTER_DESC and “Software Adapter” for the description string in the Description member.
Type: HRESULT
This method returns DXGI_ERROR_UNSUPPORTED.
Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.
HasWDDMDriver()
{
LPDIRECT3DCREATE9EX pD3D9Create9Ex = NULL;
HMODULE hD3D9 = NULL;
hD3D9 = LoadLibrary( L"d3d9.dll" );
if ( NULL == hD3D9 ) {
return false;
}
//
/* Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver.
*/
//
pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" );
return pD3D9Create9Ex != NULL;
}
IDXGIDevice * pDXGIDevice;
hr = g_pd3dDevice->QueryInterface(__uuidof(IDXGIDevice), (void **)&pDXGIDevice);
IDXGIAdapter * pDXGIAdapter;
pDXGIDevice->GetAdapter(&pDXGIAdapter);
DXGI_ADAPTER_DESC adapterDesc;
pDXGIAdapter->GetDesc(&adapterDesc);
Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).
Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).