MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetVideoAdapterDX11

Method GetVideoAdapterDX11

trinityal/dx11/Tr2VideoAdapterInfoALDx11.cpp:435–452  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Method returns DX11 adapter and output interfaces for the given adapterIndex. This method is platform-specific and is used by Tr2PimaryRenderContext. Arguments: adapterIndex - Adapter index adapter - (out) DX11 adapter interface output - (out) DX11 output interface Return Value: HRESULT of operation

Source from the content-addressed store, hash-verified

433// HRESULT of operation
434// --------------------------------------------------------------------------------------
435ALResult Tr2VideoAdapterInfo::GetVideoAdapterDX11( unsigned adapterIndex,
436 IDXGIAdapter1** adapter,
437 IDXGIOutput** output )
438{
439 if( !s_factory )
440 {
441 CR_RETURN_HR( InitializeDirect3D() );
442 }
443 if( adapterIndex >= s_adapters.size() )
444 {
445 return E_INVALIDARG;
446 }
447 *adapter = s_adapters[adapterIndex].m_adapter;
448 ( *adapter )->AddRef();
449 *output = s_adapters[adapterIndex].m_output;
450 ( *output )->AddRef();
451 return S_OK;
452}
453
454#endif

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
AddRefMethod · 0.80
InitializeDirect3DFunction · 0.70

Tested by

no test coverage detected