|
Diligent Engine API Reference
|
Implementation of Diligent Engine API using Direct3D11
The following code snippet shows how to initialize diligent engine in D3D11 mode.
Alternatively, the engine can be initialized by attaching to existing D3D11 device and immediate context (see below).
Diligent Engine exposes methods to access internal D3D11 objects, is able to create diligent engine buffers and textures from existing Direct3D11 buffers and textures, and can be initialized by attaching to existing D3D11 device and immediate context.
Below are some of the methods that provide access to internal D3D11 objects:
| Function | Description |
|---|---|
ID3D11Buffer *IBufferD3D11::GetD3D11Buffer() | returns a pointer to the ID3D11Buffer interface of the internal Direct3D11 buffer object |
ID3D11Resource* ITextureD3D11::GetD3D11Texture() | returns a pointer to the ID3D11Resource interface of the internal Direct3D11 texture object |
ID3D11View* IBufferViewD3D11()::GetD3D11View() | returns a pointer to the ID3D11View interface of the internal d3d11 object representing the buffer view |
ID3D11View* ITextureViewD3D11::GetD3D11View() | returns a pointer to the ID3D11View interface of the internal d3d11 object representing the texture view |
ID3D11Device* IRenderDeviceD3D11::GetD3D11Device() | returns a pointer to the native D3D11 device object |
ID3D11DeviceContext* IDeviceContextD3D11::GetD3D11DeviceContext() | returns a pointer to the native ID3D11DeviceContext object |
void IRenderDeviceD3D11::CreateBufferFromD3DResource(ID3D11Buffer *pd3d11Buffer, const BufferDesc& BuffDesc, IBuffer **ppBuffer) - creates a diligent engine buffer object from the native d3d11 buffervoid IRenderDeviceD3D11::CreateTextureFromD3DResource(ID3D11Texture1D *pd3d11Texture, ITexture **ppTexture) - create a diligent engine texture object from the native D3D11 1D texturevoid IRenderDeviceD3D11::CreateTextureFromD3DResource(ID3D11Texture2D *pd3d11Texture, ITexture **ppTexture) - create a diligent engine texture object from the native D3D11 2D texturevoid IRenderDeviceD3D11::CreateTextureFromD3DResource(ID3D11Texture3D *pd3d11Texture, ITexture **ppTexture) - create a diligent engine texture object from the native D3D11 3D textureThe code snippet below shows how diligent engine can be attached to D3D11 device returned by Unity
For more information about interoperability with D3D11, please visit Diligent Engine web site
Interoperability with Direct3D11
Architecture of D3D11-based implementation
Reworked the API to follow D3D12 style
Initial release
Copyright 2015-2018 Egor Yusov