Diligent Engine
 
Loading...
Searching...
No Matches
Diligent.IEngineFactory Struct Referenceabstract

Engine factory base interface. More...

#include <EngineFactory.h>

Inheritance diagram for Diligent.IEngineFactory:
Diligent.IObject Diligent.IEngineFactoryD3D11 Diligent.IEngineFactoryD3D12 Diligent::IEngineFactoryOpenGL Diligent::IEngineFactoryWebGPU Diligent::EngineFactoryBase< IEngineFactoryOpenGL > Diligent::EngineFactoryBase< IEngineFactoryWebGPU > Diligent::EngineFactoryOpenGLImpl Diligent::EngineFactoryWebGPUImpl

Public Member Functions

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.
 
- Public Member Functions inherited from Diligent.IObject
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
 

Detailed Description

Engine factory base interface.

Member Function Documentation

◆ CreateDataBlob()

virtual void DILIGENT_CALL_TYPE Diligent.IEngineFactory.CreateDataBlob ( size_t InitialSize,
const void * pData,
IDataBlob ** ppDataBlob ) const
pure virtual

Creates a data blob.

Parameters
[in]InitialSize- The size of the internal data buffer.
[in]pData- Pointer to the data to write to the internal buffer. If null, no data will be written.
[out]ppDataBlob- Memory address where the pointer to the data blob will be written.

◆ CreateDearchiver()

virtual void DILIGENT_CALL_TYPE Diligent.IEngineFactory.CreateDearchiver ( const DearchiverCreateInfo & CreateInfo,
struct IDearchiver ** ppDearchiver ) const
pure virtual

Creates a dearchiver object.

Parameters
[in]CreateInfo- Dearchiver create info, see Diligent::DearchiverCreateInfo for details.
[out]ppDearchiver- Address of the memory location where a pointer to IDearchiver interface will be written. The function calls AddRef(), so that the new object will have one reference.

Implemented in Diligent::EngineFactoryOpenGLImpl, and Diligent::EngineFactoryWebGPUImpl.

◆ CreateDefaultShaderSourceStreamFactory()

virtual void DILIGENT_CALL_TYPE Diligent.IEngineFactory.CreateDefaultShaderSourceStreamFactory ( const Char * SearchDirectories,
struct IShaderSourceInputStreamFactory ** ppShaderSourceFactory ) const
pure virtual

Creates default shader source input stream factory.

Parameters
[in]SearchDirectories- Semicolon-separated list of search directories.
[out]ppShaderSourceStreamFactory- Memory address where the pointer to the shader source stream factory will be written.

◆ EnumerateAdapters()

virtual void DILIGENT_CALL_TYPE Diligent.IEngineFactory.EnumerateAdapters ( Version MinVersion,
Uint32 & NumAdapters,
GraphicsAdapterInfo * Adapters ) const
pure virtual

Enumerates adapters available on this machine.

Parameters
[in]MinVersion- Minimum required API version (feature level for Direct3D).
[in,out]NumAdapters- The 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 the 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.
[out]Adapters- Pointer to the array containing adapter information. If null is provided, the number of available adapters is written to NumAdapters.
Note
OpenGL backend only supports one device; features and properties will have limited information.

Implemented in Diligent::EngineFactoryOpenGLImpl, and Diligent::EngineFactoryWebGPUImpl.

◆ SetBreakOnError()

virtual void DILIGENT_CALL_TYPE Diligent.IEngineFactory.SetBreakOnError ( bool BreakOnError) const
pure virtual

Sets whether to break program execution on assertion failure.

Parameters
[in]BreakOnError- Whether to break on assertion failure.

◆ SetMessageCallback()

virtual void DILIGENT_CALL_TYPE Diligent.IEngineFactory.SetMessageCallback ( DebugMessageCallbackType MessageCallback) const
pure virtual

Sets a user-provided debug message callback.

Parameters
[in]MessageCallback- Debug message callback function to use instead of the default one.