Commit 5a6f415d authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

d3d11_fmt: add D3D11_Create and D3D11_Destroy

Similar to the D3D9 API
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 46be40b8
......@@ -413,3 +413,25 @@ error:
ID3D11Texture2D_Release(slicedTexture);
return VLC_EGENERIC;
}
#undef D3D11_Create
int D3D11_Create(vlc_object_t *obj, d3d11_handle_t *hd3d)
{
#if !VLC_WINSTORE_APP
hd3d->hdll = LoadLibrary(TEXT("D3D11.DLL"));
if (!hd3d->hdll)
{
msg_Warn(obj, "cannot load d3d11.dll, aborting");
return VLC_EGENERIC;
}
#endif
return VLC_SUCCESS;
}
void D3D11_Destroy(d3d11_handle_t *hd3d)
{
#if !VLC_WINSTORE_APP
if (hd3d->hdll)
FreeLibrary(hd3d->hdll);
#endif
}
......@@ -88,6 +88,11 @@ HRESULT D3D11_CreateDevice(vlc_object_t *obj, d3d11_handle_t *,
void D3D11_ReleaseDevice(d3d11_device_t *);
int D3D11_Create(vlc_object_t *, d3d11_handle_t *);
#define D3D11_Create(a,b) D3D11_Create( VLC_OBJECT(a), b )
void D3D11_Destroy(d3d11_handle_t *);
bool isXboxHardware(ID3D11Device *d3ddev);
bool isNvidiaHardware(ID3D11Device *d3ddev);
IDXGIAdapter *D3D11DeviceAdapter(ID3D11Device *d3ddev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment