Kaynağa Gözat

Log which adapter used for DX11 (#2365)

SuperWangKai 7 yıl önce
ebeveyn
işleme
87e38f4d67

+ 7 - 0
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -2168,6 +2168,13 @@ bool Graphics::CreateDevice(int width, int height, int multiSample)
     // (the application will switch manually if it wants to)
     dxgiFactory->MakeWindowAssociation(GetWindowHandle(window_), DXGI_MWA_NO_ALT_ENTER);
 
+#ifdef URHO3D_LOGGING
+    DXGI_ADAPTER_DESC desc;
+    dxgiAdapter->GetDesc(&desc);
+    String adapterDesc(desc.Description);
+    URHO3D_LOGINFO("Adapter used " + adapterDesc);
+#endif
+
     dxgiFactory->Release();
     dxgiAdapter->Release();
     dxgiDevice->Release();