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

Dearchiver interface. More...

#include <Dearchiver.h>

Inheritance diagram for Diligent::IDearchiver:
Diligent.IObject

Public Member Functions

virtual Bool DILIGENT_CALL_TYPE LoadArchive (const IDataBlob *pArchive, Uint32 ContentVersion=~0u, Bool MakeCopy=false)=0
 Lodas a device object archive.
 
virtual void DILIGENT_CALL_TYPE UnpackShader (const ShaderUnpackInfo &UnpackInfo, IShader **ppShader)=0
 Unpacks a shader from the device object archive.
 
virtual void DILIGENT_CALL_TYPE UnpackPipelineState (const PipelineStateUnpackInfo &UnpackInfo, IPipelineState **ppPSO)=0
 Unpacks a pipeline state object from the device object archive.
 
virtual void DILIGENT_CALL_TYPE UnpackResourceSignature (const ResourceSignatureUnpackInfo &UnpackInfo, IPipelineResourceSignature **ppSignature)=0
 Unpacks resource signature from the device object archive.
 
virtual void DILIGENT_CALL_TYPE UnpackRenderPass (const RenderPassUnpackInfo &UnpackInfo, IRenderPass **ppRP)=0
 Unpacks render pass from the device object archive.
 
virtual Bool DILIGENT_CALL_TYPE Store (IDataBlob **ppArchive) const =0
 Writes archive data to the data blob.
 
virtual void DILIGENT_CALL_TYPE Reset ()=0
 
virtual Uint32 DILIGENT_CALL_TYPE GetContentVersion () const =0
 
- 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

Dearchiver interface.

Member Function Documentation

◆ GetContentVersion()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IDearchiver::GetContentVersion ( ) const
pure virtual

Returns the content version of the archive. If no data has been loaded, returns ~0u (aka 0xFFFFFFFF).

◆ LoadArchive()

virtual Bool DILIGENT_CALL_TYPE Diligent::IDearchiver::LoadArchive ( const IDataBlob * pArchive,
Uint32 ContentVersion = ~0u,
Bool MakeCopy = false )
pure virtual

Lodas a device object archive.

Parameters
[in]pArchive- A pointer to the source raw data to load objects from.
[in]ContentVersion- The expected version of the content in the archive. If the version of the content in the archive does not match the expected version, the method will fail. If default value is used (~0u aka 0xFFFFFFFF), the version will not be checked.
[in]MakeCopy- Whether to make a copy of the archive, or use the the original contents.
Returns
true if the archive has been loaded successfully, and false otherwise.
Note
If the archive was not copied, the dearchiver will keep a strong reference to the pArchive data blob. It will be kept alive until the dearchiver object is released or the Reset() method is called.
Warning
If the archive was loaded without making a copy, the application must not modify its contents while it is in use by the dearchiver.
This method is not thread-safe and must not be called simultaneously with other methods.

◆ Reset()

virtual void DILIGENT_CALL_TYPE Diligent::IDearchiver::Reset ( )
pure virtual

Resets the dearchiver state and releases all loaded objects.

Warning
This method is not thread-safe and must not be called simultaneously with other methods.

◆ Store()

virtual Bool DILIGENT_CALL_TYPE Diligent::IDearchiver::Store ( IDataBlob ** ppArchive) const
pure virtual

Writes archive data to the data blob.

Parameters
[in]ppArchive- Memory location where a pointer to the archive data blob will be written.
Returns
true if the archive data was written successfully, and false otherwise.
Note
This method combines all archives loaded by the dearchiver into a single archive.
Warning
This method is not thread-safe and must not be called simultaneously with other methods.

◆ UnpackPipelineState()

virtual void DILIGENT_CALL_TYPE Diligent::IDearchiver::UnpackPipelineState ( const PipelineStateUnpackInfo & UnpackInfo,
IPipelineState ** ppPSO )
pure virtual

Unpacks a pipeline state object from the device object archive.

Parameters
[in]UnpackInfo- Pipeline state unpack info, see Diligent::PipelineStateUnpackInfo.
[out]ppPSO- Address of the memory location where a pointer to the unpacked pipeline state object will be stored. The function calls AddRef(), so that the PSO will have one reference.
Note
Resource signatures used by the PSO will be unpacked from the same archive.
This method is thread-safe.

◆ UnpackRenderPass()

virtual void DILIGENT_CALL_TYPE Diligent::IDearchiver::UnpackRenderPass ( const RenderPassUnpackInfo & UnpackInfo,
IRenderPass ** ppRP )
pure virtual

Unpacks render pass from the device object archive.

Parameters
[in]UnpackInfo- Render pass unpack info, see Diligent::RenderPassUnpackInfo.
[out]ppSignature- Address of the memory location where a pointer to the unpacked render pass object will be stored. The function calls AddRef(), so that the render pass will have one reference.
Note
This method is thread-safe.

◆ UnpackResourceSignature()

virtual void DILIGENT_CALL_TYPE Diligent::IDearchiver::UnpackResourceSignature ( const ResourceSignatureUnpackInfo & UnpackInfo,
IPipelineResourceSignature ** ppSignature )
pure virtual

Unpacks resource signature from the device object archive.

Parameters
[in]UnpackInfo- Resource signature unpack info, see Diligent::ResourceSignatureUnpackInfo.
[out]ppSignature- Address of the memory location where a pointer to the unpacked pipeline resource signature object will be stored. The function calls AddRef(), so that the resource signature will have one reference.
Note
This method is thread-safe.

◆ UnpackShader()

virtual void DILIGENT_CALL_TYPE Diligent::IDearchiver::UnpackShader ( const ShaderUnpackInfo & UnpackInfo,
IShader ** ppShader )
pure virtual

Unpacks a shader from the device object archive.

Parameters
[in]UnpackInfo- Shader unpack info, see Diligent::ShaderUnpackInfo.
[out]ppShader- Address of the memory location where a pointer to the unpacked shader object will be stored. The function calls AddRef(), so that the shader object will have one reference.
Note
This method is thread-safe.