Engine factory for Direct3D12 rendering backend. More...
#include <EngineFactoryD3D12.h>
Public Member Functions | |
virtual Bool DILIGENT_CALL_TYPE | LoadD3D12 (const char *DllName="d3d12.dll")=0 |
Loads D3D12 DLL and entry points. | |
virtual void DILIGENT_CALL_TYPE | CreateDeviceAndContextsD3D12 (const EngineD3D12CreateInfo &EngineCI, IRenderDevice **ppDevice, IDeviceContext **ppContexts)=0 |
Creates a render device and device contexts for Direct3D12-based engine implementation. | |
virtual void DILIGENT_CALL_TYPE | CreateCommandQueueD3D12 (void *pd3d12NativeDevice, void *pd3d12NativeCommandQueue, struct IMemoryAllocator *pRawMemAllocator, struct ICommandQueueD3D12 **ppCommandQueue)=0 |
Creates a command queue from Direct3D12 native command queue. | |
virtual void DILIGENT_CALL_TYPE | AttachToD3D12Device (void *pd3d12NativeDevice, Uint32 CommandQueueCount, struct ICommandQueueD3D12 **ppCommandQueues, const EngineD3D12CreateInfo &EngineCI, IRenderDevice **ppDevice, IDeviceContext **ppContexts)=0 |
Attaches to existing Direct3D12 device. | |
virtual void DILIGENT_CALL_TYPE | CreateSwapChainD3D12 (IRenderDevice *pDevice, IDeviceContext *pImmediateContext, const SwapChainDesc &SwapChainDesc, const FullScreenModeDesc &FSDesc, const NativeWindow &Window, ISwapChain **ppSwapChain)=0 |
Creates a swap chain for Direct3D12-based engine implementation. | |
virtual void DILIGENT_CALL_TYPE | EnumerateDisplayModes (Version MinFeatureLevel, Uint32 AdapterId, Uint32 OutputId, TEXTURE_FORMAT Format, Uint32 &NumDisplayModes, DisplayModeAttribs *DisplayModes)=0 |
Enumerates available display modes for the specified output of the specified adapter. | |
![]() | |
virtual const APIInfo &DILIGENT_CALL_TYPE | GetAPIInfo () const =0 |
Returns API info structure, see Diligent::APIInfo. | |
virtual void DILIGENT_CALL_TYPE | CreateDefaultShaderSourceStreamFactory (const Char *SearchDirectories, struct IShaderSourceInputStreamFactory **ppShaderSourceFactory) const =0 |
Creates default shader source input stream factory. | |
virtual void DILIGENT_CALL_TYPE | CreateDataBlob (size_t InitialSize, const void *pData, IDataBlob **ppDataBlob) const =0 |
Creates a data blob. | |
virtual void DILIGENT_CALL_TYPE | EnumerateAdapters (Version MinVersion, Uint32 &NumAdapters, GraphicsAdapterInfo *Adapters) const =0 |
Enumerates adapters available on this machine. | |
virtual void DILIGENT_CALL_TYPE | CreateDearchiver (const DearchiverCreateInfo &CreateInfo, struct IDearchiver **ppDearchiver) const =0 |
Creates a dearchiver object. | |
virtual void DILIGENT_CALL_TYPE | SetMessageCallback (DebugMessageCallbackType MessageCallback) const =0 |
Sets a user-provided debug message callback. | |
virtual void DILIGENT_CALL_TYPE | SetBreakOnError (bool BreakOnError) const =0 |
Sets whether to break program execution on assertion failure. | |
![]() | |
virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Engine factory for Direct3D12 rendering backend.
|
pure virtual |
Attaches to existing Direct3D12 device.
[in] | pd3d12NativeDevice | - Pointer to the native Direct3D12 device. |
[in] | CommandQueueCount | - Number of command queues. |
[in] | ppCommandQueues | - Pointer to the array of command queues. Must be created from existing command queue using CreateCommandQueueD3D12(). |
[in] | EngineCI | - Engine creation info. |
[out] | ppDevice | - Address of the memory location where pointer to the created device will be written |
[out] | ppContexts | - Address of the memory location where pointers to the contexts will be written. Immediate context goes at position 0. If EngineCI.NumDeferredContexts > 0 , pointers to the deferred contexts are written afterwards. |
|
pure virtual |
Creates a command queue from Direct3D12 native command queue.
[in] | pd3d12NativeDevice | - Pointer to the native Direct3D12 device. |
[in] | pd3d12NativeDevice | - Pointer to the native Direct3D12 command queue. |
[in] | pRawMemAllocator | - Pointer to the raw memory allocator. Must be the same as EngineCreateInfo::pRawMemAllocator in the following AttachToD3D12Device() call. |
[out] | ppCommandQueue | - Address of the memory location where pointer to the command queue will be written. |
|
pure virtual |
Creates a render device and device contexts for Direct3D12-based engine implementation.
[in] | EngineCI | - Engine creation info. |
[out] | ppDevice | - Address of the memory location where pointer to the created device will be written. |
[out] | ppContexts | - Address of the memory location where pointers to the contexts will be written. Immediate context goes at position 0. If EngineCI.NumDeferredContexts > 0 , pointers to the deferred contexts are written afterwards. |
|
pure virtual |
Creates a swap chain for Direct3D12-based engine implementation.
[in] | pDevice | - Pointer to the render device. |
[in] | pImmediateContext | - Pointer to the immediate device context. Only graphics contexts are supported. |
[in] | SCDesc | - Swap chain description. |
[in] | FSDesc | - Fullscreen mode description. |
[in] | Window | - Platform-specific native window description that the swap chain will be associated with:
|
[out] | ppSwapChain | - Address of the memory location where pointer to the new swap chain will be written |
|
pure virtual |
Enumerates available display modes for the specified output of the specified adapter.
[in] | MinFeatureLevel | - Minimum feature level of the adapter that was given to EnumerateAdapters(). |
[in] | AdapterId | - Id of the adapter enumerated by EnumerateAdapters(). |
[in] | OutputId | - Adapter output id. |
[in] | Format | - Display mode format. |
[in,out] | NumDisplayModes | - Number of display modes. If DisplayModes is null, this value is overwritten with the number of display modes available for this output. If DisplayModes is not null, this value should contain the maximum number of elements to be written to DisplayModes array. It is overwritten with the actual number of display modes written. |
|
pure virtual |
Loads D3D12 DLL and entry points.
[in] | DllName | - D3D12 dll name. |
IEngineFactoryD3D12::CreateDeviceAndContextsD3D12() and IEngineFactoryD3D12::AttachToD3D12Device() functions will automatically load the DLL if it has not be loaded already.
This method has no effect on UWP.