Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateBuffer(ulong, ulong)

Create a new buffer for a number of elements with a given stride.
Read time 1 minuteLast updated 6 days ago

Definition

public BufferID CreateBuffer(ulong count, ulong stride)

Parameters

count

Number of elements in the buffer.

stride

Stride of the buffer in bytes.

Returns

Type

Description

BufferIDID of the newly created buffer.

Remarks

using UnityEngine.LightTransport;IDeviceContext ctx = new RadeonRaysContext();ctx.Initialize();const int numberOfElements = 4;const int strideInBytes = 4;var bufferID = ctx.CreateBuffer(numberOfElements, strideInBytes);ctx.DestroyBuffer(bufferID);ctx.Dispose();
How to create a buffer.