Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::IArchiver Struct Referenceabstract

Render state object archiver interface. More...

#include <Archiver.h>

Inheritance diagram for Diligent::IArchiver:
Diligent.IObject

Public Member Functions

virtual Bool DILIGENT_CALL_TYPE SerializeToBlob (Uint32 ContentVersion, IDataBlob **ppBlob)=0
 Writes archive to a memory blob.
 
virtual Bool DILIGENT_CALL_TYPE SerializeToStream (Uint32 ContentVersion, IFileStream *pStream)=0
 Writes archive to a file stream.
 
virtual Bool DILIGENT_CALL_TYPE AddShader (IShader *pShader)=0
 Adds a shader to the archive.
 
virtual Bool DILIGENT_CALL_TYPE AddPipelineState (IPipelineState *pPSO)=0
 Adds a pipeline state to the archive.
 
virtual Bool DILIGENT_CALL_TYPE AddPipelineResourceSignature (IPipelineResourceSignature *pSignature)=0
 Adds a pipeline resource signature to the archive.
 
virtual void DILIGENT_CALL_TYPE Reset ()=0
 Resets the archiver to default state and removes all added resources.
 
virtual IShader *DILIGENT_CALL_TYPE GetShader (const char *ShaderName)=0
 Returns a pointer to the shader object previously added by the AddShader() method.
 
virtual IPipelineState *DILIGENT_CALL_TYPE GetPipelineState (PIPELINE_TYPE PSOType, const char *PSOName)=0
 Returns a pointer to the pipeline state object previously added by the AddPipelineState() method.
 
virtual IPipelineResourceSignature *DILIGENT_CALL_TYPE GetPipelineResourceSignature (const char *PRSName)=0
 Returns a pointer to the pipeline resource signature previously added by the AddPipelineResourceSignature() method.
 
- 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

Render state object archiver interface.

Member Function Documentation

◆ AddPipelineResourceSignature()

virtual Bool DILIGENT_CALL_TYPE Diligent::IArchiver::AddPipelineResourceSignature ( IPipelineResourceSignature * pSignature)
pure virtual

Adds a pipeline resource signature to the archive.

Parameters
[in]pSignature- a pointer to the resource signature to add to the archive.
Returns
true if the signature was added successfully, and false otherwise.
Note
Pipeline resource signature pointed to by pSignature must have been created by the serialization device.
Multiple PSOs and signatures may be packed into the same archive as long as they use distinct names.

The method is thread-safe and may be called from multiple threads simultaneously.

◆ AddPipelineState()

virtual Bool DILIGENT_CALL_TYPE Diligent::IArchiver::AddPipelineState ( IPipelineState * pPSO)
pure virtual

Adds a pipeline state to the archive.

Parameters
[in]pPSO- a pointer to the pipeline state to add to the archive.
Returns
true if the pipeline state was added successfully, and false otherwise.
Note
Pipeline state object pointed to by pPSO must have been created by the serialization device.
Multiple pipeline states may be packed into the same archive as long as they use unique names. All dependent objects (render pass, resource signatures, shaders) will be added to the archive and must also use unique names.

The method is thread-safe and may be called from multiple threads simultaneously.

◆ AddShader()

virtual Bool DILIGENT_CALL_TYPE Diligent::IArchiver::AddShader ( IShader * pShader)
pure virtual

Adds a shader to the archive.

Parameters
[in]pShader- a pointer to the shader to add to the archive.
Returns
true if the shader was added successfully, and false otherwise.
Note
Shader object pointed to by pShader must have been created by the serialization device.
Multiple shaders may be packed into the same archive as long as they use unique names.

The method is thread-safe and may be called from multiple threads simultaneously.

◆ GetPipelineResourceSignature()

virtual IPipelineResourceSignature *DILIGENT_CALL_TYPE Diligent::IArchiver::GetPipelineResourceSignature ( const char * PRSName)
pure virtual

Returns a pointer to the pipeline resource signature previously added by the AddPipelineResourceSignature() method.

Parameters
[in]PRSName- Name of the pipeline resource signature to retrieve.
Returns
A pointer to the the pipeline resource signature object, or null if the object with that name was not added.
Note
The method does NOT increment the reference counter of the returned object, so the application must not call Release() unless it also explicitly calls AddRef().

◆ GetPipelineState()

virtual IPipelineState *DILIGENT_CALL_TYPE Diligent::IArchiver::GetPipelineState ( PIPELINE_TYPE PSOType,
const char * PSOName )
pure virtual

Returns a pointer to the pipeline state object previously added by the AddPipelineState() method.

Parameters
[in]PSOType- Type of the pipeline state to retrieve.
[in]PSOName- Name of the pipeline state to retrieve.
Returns
A pointer to the pipeline state object, or null if the object with that name was not added.
Note
The method does NOT increment the reference counter of the returned object, so the application must not call Release() unless it also explicitly calls AddRef().

◆ GetShader()

virtual IShader *DILIGENT_CALL_TYPE Diligent::IArchiver::GetShader ( const char * ShaderName)
pure virtual

Returns a pointer to the shader object previously added by the AddShader() method.

Parameters
[in]ShaderName- Name of the shader object to retrieve.
Returns
A pointer to the shader object, or null if the object with that name was not added.
Note
The method does NOT increment the reference counter of the returned object, so the application must not call Release() unless it also explicitly calls AddRef().

◆ SerializeToBlob()

virtual Bool DILIGENT_CALL_TYPE Diligent::IArchiver::SerializeToBlob ( Uint32 ContentVersion,
IDataBlob ** ppBlob )
pure virtual

Writes archive to a memory blob.

Parameters
[in]ContentVersion- user-provided content version that will be stored in the archive header.
[out]ppBlob- memory location where a pointer to the data blob will be stored.
Note
The method is not thread-safe and must not be called from multiple threads simultaneously.

◆ SerializeToStream()

virtual Bool DILIGENT_CALL_TYPE Diligent::IArchiver::SerializeToStream ( Uint32 ContentVersion,
IFileStream * pStream )
pure virtual

Writes archive to a file stream.

Parameters
[in]ContentVersion- user-provided content version that will be stored in the archive header.
[out]pStream- a pointer to the stream to write the archive to.
Note
The method is not thread-safe and must not be called from multiple threads simultaneously.