[idd] initial indirect driver with Looking Glass monitor
This commit is contained in:
1 parent
11676d3d56
commit
75da66a090
21 files changed
+1189
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#include "Direct3DDevice.h"
|
||||
|
||||
HRESULT Direct3DDevice::Init()
|
||||
{
|
||||
HRESULT hr = CreateDXGIFactory2(0, IID_PPV_ARGS(&m_factory));
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = m_factory->EnumAdapterByLuid(m_adapterLuid, IID_PPV_ARGS(&m_adapter));
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = D3D11CreateDevice(
|
||||
m_adapter.Get(),
|
||||
D3D_DRIVER_TYPE_UNKNOWN,
|
||||
nullptr,
|
||||
D3D11_CREATE_DEVICE_BGRA_SUPPORT,
|
||||
nullptr,
|
||||
0,
|
||||
D3D11_SDK_VERSION,
|
||||
&m_device,
|
||||
nullptr,
|
||||
&m_context);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
Reference in new issue
Block a user