ITextureUploader class
Asynchronous texture uplader.
Contents
- Reference
Base classes
- struct IObject
- Base interface for all dynamic objects in the engine.
Derived classes
-
template<typename Base>class RefCountedObject
- Base class for all reference counting objects.
Public functions
- void RenderThreadUpdate(IDeviceContext* pContext) pure virtual
- Executes pending render-thread operations.
- void AllocateUploadBuffer(IDeviceContext* pContext, const UploadBufferDesc& Desc, IUploadBuffer** ppBuffer) pure virtual
- Allocates upload buffer.
- void ScheduleGPUCopy(IDeviceContext* pContext, ITexture* pDstTexture, Uint32 ArraySlice, Uint32 MipLevel, IUploadBuffer* pUploadBuffer) pure virtual
- Schedules a GPU copy or executes the copy immediately.
- void RecycleBuffer(IUploadBuffer* pUploadBuffer) pure virtual
- Recycles upload buffer to make it available for future operations.
- auto GetStats() -> TextureUploaderStats pure virtual
- Returns texture uploader statistics, see Diligent::
TextureUploaderStats.
Function documentation
void Diligent:: ITextureUploader:: AllocateUploadBuffer(IDeviceContext* pContext,
const UploadBufferDesc& Desc,
IUploadBuffer** ppBuffer) pure virtual
Allocates upload buffer.
| Parameters | |
|---|---|
| pContext in | - Pointer to the device context when the method is executed by render thread, or null when it is called from a worker thread, see remarks. |
| Desc in | - Buffer description, see Diligent:: |
| ppBuffer out | - Memory address where pointer to the created upload buffer object will be written to. |
The method can be safely called from multiple threads simultaneously. However, if pContext is not null, the application is responsible for synchronizing the access to the context.
void Diligent:: ITextureUploader:: ScheduleGPUCopy(IDeviceContext* pContext,
ITexture* pDstTexture,
Uint32 ArraySlice,
Uint32 MipLevel,
IUploadBuffer* pUploadBuffer) pure virtual
Schedules a GPU copy or executes the copy immediately.
| Parameters | |
|---|---|
| pContext in | - Pointer to the device context when the method is executed by render thread, or null when it is called from a worker thread, see remarks. |
| pDstTexture in | - Destination texture for copy operation. |
| ArraySlice in | - Destination array slice. When multiple slices are copied, the starting slice. |
| MipLevel in | - Destination mip level. When multiple mip levels are copied, the starting mip level. |
| pUploadBuffer in | - Upload buffer to copy data from. |
void Diligent:: ITextureUploader:: RecycleBuffer(IUploadBuffer* pUploadBuffer) pure virtual
Recycles upload buffer to make it available for future operations.
| Parameters | |
|---|---|
| pUploadBuffer in | - Upload buffer to recycle. |