文档

Unity Engine

Unity Engine

CreateBuffer(ulong, ulong)

Create a new buffer for a number of elements with a given stride.
阅读时间1 分钟最后更新于 1 个月前

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.