Diligent::IEngineFactoryD3D12 struct

Engine factory for Direct3D12 rendering backend.

Base classes

struct IEngineFactory
Engine factory base interface.

Derived classes

template<class BaseInterface>
class EngineFactoryBase
Template class implementing base functionality of the engine factory.

Public functions

auto LoadD3D12(const char* DllName = "d3d12.dll") -> bool METHOD() virtual
Loads D3D12 DLL and entry points.
auto CreateDeviceAndContextsD3D12(const EngineD3D12CreateInfo& EngineCI, IRenderDevice** ppDevice, IDeviceContext** ppContexts) -> void METHOD() virtual
Creates a render device and device contexts for Direct3D12-based engine implementation.
auto AttachToD3D12Device(void* pd3d12NativeDevice, size_t CommandQueueCount, struct ICommandQueueD3D12** ppCommandQueues, const EngineD3D12CreateInfo& EngineCI, IRenderDevice** ppDevice, IDeviceContext** ppContexts) -> void METHOD() virtual
Attaches to existing Direct3D12 device.
auto CreateSwapChainD3D12(IRenderDevice* pDevice, IDeviceContext* pImmediateContext, const SwapChainDesc& SwapChainDesc, const FullScreenModeDesc& FSDesc, const NativeWindow& Window, ISwapChain** ppSwapChain) -> void METHOD() virtual
Creates a swap chain for Direct3D12-based engine implementation.
auto EnumerateAdapters(DIRECT3D_FEATURE_LEVEL MinFeatureLevel, Uint32& NumAdapters, GraphicsAdapterInfo* Adapters) -> void METHOD() virtual
Enumerates hardware adapters available on this machine.
auto EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFeatureLevel, Uint32 AdapterId, Uint32 OutputId, TEXTURE_FORMAT Format, Uint32& NumDisplayModes, DisplayModeAttribs* DisplayModes) -> void METHOD() virtual
Enumerates available display modes for the specified output of the specified adapter.

Function documentation

bool METHOD() Diligent::IEngineFactoryD3D12::LoadD3D12(const char* DllName = "d3d12.dll") virtual

Loads D3D12 DLL and entry points.

Parameters
DllName in - D3D12 dll name.
Returns true if the library and entry points are loaded sucessfully and false otherwise.

This method has no effect on UWP.

void METHOD() Diligent::IEngineFactoryD3D12::CreateDeviceAndContextsD3D12(const EngineD3D12CreateInfo& EngineCI, IRenderDevice** ppDevice, IDeviceContext** ppContexts) virtual

Creates a render device and device contexts for Direct3D12-based engine implementation.

Parameters
EngineCI in - Engine creation info.
ppDevice out - Address of the memory location where pointer to the created device will be written.
ppContexts out - 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.

void METHOD() Diligent::IEngineFactoryD3D12::AttachToD3D12Device(void* pd3d12NativeDevice, size_t CommandQueueCount, struct ICommandQueueD3D12** ppCommandQueues, const EngineD3D12CreateInfo& EngineCI, IRenderDevice** ppDevice, IDeviceContext** ppContexts) virtual

Attaches to existing Direct3D12 device.

Parameters
pd3d12NativeDevice in - Pointer to the native Direct3D12 device.
CommandQueueCount in - Number of command queues.
ppCommandQueues in - Pointer to the array of command queues.
EngineCI in - Engine creation info.
ppDevice out - Address of the memory location where pointer to the created device will be written
ppContexts out - 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.

void METHOD() Diligent::IEngineFactoryD3D12::CreateSwapChainD3D12(IRenderDevice* pDevice, IDeviceContext* pImmediateContext, const SwapChainDesc& SwapChainDesc, const FullScreenModeDesc& FSDesc, const NativeWindow& Window, ISwapChain** ppSwapChain) virtual

Creates a swap chain for Direct3D12-based engine implementation.

Parameters
pDevice in - Pointer to the render device.
pImmediateContext in - Pointer to the immediate device context.
SwapChainDesc
FSDesc in - Fullscreen mode description.
Window in

- Platform-specific native window description that the swap chain will be associated with:

  • On Win32 platform, this is the window handle (HWND)
  • On Universal Windows Platform, this is the reference to the core window (Windows::UI::Core::CoreWindow)
ppSwapChain out - Address of the memory location where pointer to the new swap chain will be written

void METHOD() Diligent::IEngineFactoryD3D12::EnumerateAdapters(DIRECT3D_FEATURE_LEVEL MinFeatureLevel, Uint32& NumAdapters, GraphicsAdapterInfo* Adapters) virtual

Enumerates hardware adapters available on this machine.

Parameters
MinFeatureLevel in - Minimum required feature level.
NumAdapters in/out - Number of adapters. If Adapters is null, this value will be overwritten with the number of adapters available on this system. If Adapters is not null, this value should contain maximum number of elements reserved in the array pointed to by Adapters. In the latter case, this value is overwritten with the actual number of elements written to Adapters.
Adapters out - Pointer to the array conataining adapter information. If null is provided, the number of available adapters is written to NumAdapters

void METHOD() Diligent::IEngineFactoryD3D12::EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFeatureLevel, Uint32 AdapterId, Uint32 OutputId, TEXTURE_FORMAT Format, Uint32& NumDisplayModes, DisplayModeAttribs* DisplayModes) virtual

Enumerates available display modes for the specified output of the specified adapter.

Parameters
MinFeatureLevel in - Minimum feature level of the adapter that was given to EnumerateAdapters().
AdapterId in - Id of the adapter enumerated by EnumerateAdapters().
OutputId in - Adapter output id.
Format in - Display mode format.
NumDisplayModes in/out - 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.
DisplayModes