Class GPUUploadBufferTask
GPU buffer upload task.
Assembly: FlaxEngine.dll
File: Engine/Graphics/Async/Tasks/GPUUploadBufferTask.h
Syntax
public class GPUUploadBufferTask : public GPUTask
Constructors
GPUUploadBufferTask(GPUBuffer* buffer, int32 offset, Span<byte> data, bool copyData)
Initializes a new instance of the GPUUploadBufferTask class.
Declaration
public GPUUploadBufferTask(GPUBuffer* buffer, int32 offset, Span<byte> data, bool copyData)
Parameters
|
GPUBuffer
buffer
The target buffer. |
|
int32
offset
The target buffer offset to copy data to. The default value is 0. |
|
Span<byte>
data
The data to upload. |
|
bool
copyData
True if copy data to the temporary buffer, otherwise the input data will be used directly. Then ensure it is valid during the copy operation period (for the next few frames). |
Fields
_buffer
Declaration
protected BufferReference _buffer
Field Value
|
BufferReference
|
_data
Declaration
protected BytesContainer _data
Field Value
|
BytesContainer
|
_offset
Declaration
protected int32 _offset
Field Value
|
int32
|
Methods
HasReference(Object* resource)
Determines whether the specified object has reference to the given object.
Declaration
public virtual bool HasReference(Object* resource) const override
Parameters
|
Object
obj
The object. |
Returns
|
bool
True if the specified object has reference to the given object, otherwise false. |
Overrides
OnEnd()
run(GPUTasksContext* context)
Declaration
protected virtual Result run(GPUTasksContext* context) override
Parameters
|
GPUTasksContext
context
|
Returns
|
Result
|