Ejemplo n.º 1
0
 /// <summary>
 /// Updates the buffer data.
 /// </summary>
 /// <param name="buffer">The destination buffer to write to.</param>
 /// <param name="data">The pointer to the data.</param>
 /// <param name="size">The data size (in bytes) to write.</param>
 /// <param name="offset">The offset (in bytes) from the buffer start to copy data to.</param>
 public void UpdateBuffer(GPUBuffer buffer, IntPtr data, uint size, uint offset = 0)
 {
     Internal_UpdateBuffer(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(buffer), data, size, offset);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Copies the buffer data.
 /// </summary>
 /// <param name="dstBuffer">The destination buffer to write to.</param>
 /// <param name="srcBuffer">The source buffer to read from.</param>
 /// <param name="size">The size of data to copy (in bytes).</param>
 /// <param name="dstOffset">The offset (in bytes) from the destination buffer start to copy data to.</param>
 /// <param name="srcOffset">The offset (in bytes) from the source buffer start to copy data from.</param>
 public void CopyBuffer(GPUBuffer dstBuffer, GPUBuffer srcBuffer, uint size, uint dstOffset = 0, uint srcOffset = 0)
 {
     Internal_CopyBuffer(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(dstBuffer), FlaxEngine.Object.GetUnmanagedPtr(srcBuffer), size, dstOffset, srcOffset);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Clears an unordered access resource with a float value.
 /// </summary>
 /// <param name="buf">The buffer to clear.</param>
 /// <param name="value">The clear value.</param>
 public void ClearUA(GPUBuffer buf, Vector4 value)
 {
     Internal_ClearUA(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(buf), ref value);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Draws the instanced GPU-generated indexed primitives. Buffer must contain GPUDrawIndexedIndirectArgs.
 /// </summary>
 /// <param name="bufferForArgs">The buffer with drawing arguments.</param>
 /// <param name="offsetForArgs">The aligned byte offset for arguments.</param>
 public void DrawIndexedInstancedIndirect(GPUBuffer bufferForArgs, uint offsetForArgs)
 {
     Internal_DrawIndexedInstancedIndirect(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(bufferForArgs), offsetForArgs);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Sets the render target and unordered access output.
 /// </summary>
 /// <param name="rt">The render target to bind to output.</param>
 /// <param name="uaOutput">The unordered access buffer to bind to output.</param>
 public void SetRenderTarget(GPUTextureView rt, GPUBuffer uaOutput)
 {
     Internal_SetRenderTarget3(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(rt), FlaxEngine.Object.GetUnmanagedPtr(uaOutput));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Copies the counter buffer value.
 /// </summary>
 /// <param name="dstBuffer">The destination buffer.</param>
 /// <param name="dstOffset">The destination aligned byte offset.</param>
 /// <param name="srcBuffer">The source buffer.</param>
 public void CopyCounter(GPUBuffer dstBuffer, uint dstOffset, GPUBuffer srcBuffer)
 {
     Internal_CopyCounter(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(dstBuffer), dstOffset, FlaxEngine.Object.GetUnmanagedPtr(srcBuffer));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Resets the counter buffer to zero (hidden by the driver).
 /// </summary>
 /// <param name="buffer">The buffer.</param>
 public void ResetCounter(GPUBuffer buffer)
 {
     Internal_ResetCounter(unmanagedPtr, FlaxEngine.Object.GetUnmanagedPtr(buffer));
 }