MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetDefaultAdapterName

Method GetDefaultAdapterName

TombEngine/Renderer/RendererSettings.cpp:45–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 std::string Renderer::GetDefaultAdapterName()
46 {
47 IDXGIFactory* dxgiFactory = NULL;
48 Utils::throwIfFailed(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&dxgiFactory));
49
50 IDXGIAdapter* dxgiAdapter = NULL;
51
52 dxgiFactory->EnumAdapters(0, &dxgiAdapter);
53
54 DXGI_ADAPTER_DESC adapterDesc = {};
55
56 dxgiAdapter->GetDesc(&adapterDesc);
57 dxgiFactory->Release();
58
59 return TEN::Utils::ToString(adapterDesc.Description);
60 }
61
62 const AdapterInfo& Renderer::GetAdapterInfo() const
63 {

Callers 1

InitDefaultConfigurationFunction · 0.80

Calls 2

throwIfFailedFunction · 0.85
ToStringFunction · 0.85

Tested by

no test coverage detected