Home -> ITextureBuffer -> QueueDataUpdate

Description

The QueueDataUpdate method schedules an update to data in an allocated texture. Updates can target a mipmap level and, depending on texture type, an image offset, image region, cubemap face, or array entry.

Unlike SetInitialData, the provided CPU memory may be modified or deallocated immediately after this method returns. The renderer copies or stages the data needed for the scheduled transfer. Source format arguments describe the CPU memory layout and allow supported conversion into the allocated texture format.

ImportantImportant

Queued updates are scheduled GPU work. When an ITransferBatch is supplied, completion and visibility follow that batch.

Usage

template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, int mipmapLevel = 0, const V1UInt32& imageOffsetInPixels = V1UInt32(0), const V1UInt32& imageRegionInPixels = V1UInt32(0), ITransferBatch* transferBatch = nullptr);
template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, int mipmapLevel = 0, const V3UInt32& imageOffsetInPixels = V3UInt32(0, 0, 0), const V3UInt32& imageRegionInPixels = V3UInt32(0, 0, 0), ITransferBatch* transferBatch = nullptr);
template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, CubeMapFace targetFace, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, size_t arrayIndex = 0, int mipmapLevel = 0, const V1UInt32& imageOffsetInPixels = V1UInt32(0), const V1UInt32& imageRegionInPixels = V1UInt32(0), ITransferBatch* transferBatch = nullptr);
template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, size_t arrayIndex = 0, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
template<class T> SuccessToken QueueDataUpdate(const std::vector<T>& sourceBuffer, CubeMapFace targetFace, size_t arrayIndex = 0, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, int mipmapLevel = 0, const V1UInt32& imageOffsetInPixels = V1UInt32(0), const V1UInt32& imageRegionInPixels = V1UInt32(0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, int mipmapLevel = 0, const V3UInt32& imageOffsetInPixels = V3UInt32(0, 0, 0), const V3UInt32& imageRegionInPixels = V3UInt32(0, 0, 0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, CubeMapFace targetFace, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, size_t arrayIndex = 0, int mipmapLevel = 0, const V1UInt32& imageOffsetInPixels = V1UInt32(0), const V1UInt32& imageRegionInPixels = V1UInt32(0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, size_t arrayIndex = 0, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);
SuccessToken QueueDataUpdate(const void* sourceBuffer, size_t sourceBufferSizeInBytes, SourceImageFormat imageFormat, SourceDataFormat dataFormat, CubeMapFace targetFace, size_t arrayIndex = 0, int mipmapLevel = 0, const V2UInt32& imageOffsetInPixels = V2UInt32(0, 0), const V2UInt32& imageRegionInPixels = V2UInt32(0, 0), ITransferBatch* transferBatch = nullptr);

Argument list

sourceBuffer [const std::vector<T> or const void*]
The source data to copy into the texture.
sourceBufferSizeInBytes [size_t]
The size, in bytes, of the source data.
imageFormat [SourceImageFormat]
The image channel layout of the source data.
dataFormat [SourceDataFormat]
The data encoding of the source data.
targetFace [CubeMapFace]
The cubemap face to update for cubemap texture types.
arrayIndex [size_t]
The array element to update for array texture types.
mipmapLevel [int]
The mipmap level to update.
imageOffsetInPixels [V1UInt32, V2UInt32, or V3UInt32]
The texel offset within the mipmap level where the update begins.
imageRegionInPixels [V1UInt32, V2UInt32, or V3UInt32]
The texel dimensions of the region to update. A zero value updates the remaining image from the offset.
transferBatch [ITransferBatch*]
An optional transfer batch to schedule the update into. If null, the renderer schedules the update independently.

Return value

[SuccessToken]
True if the operation succeeded, false otherwise. An assertion will be raised in debug builds if the result is not tested.

See also