Version: 2023.2

GraphicsBufferConstructor

切换到手册
public GraphicsBuffer (GraphicsBuffer.Target target, GraphicsBuffer.UsageFlags usageFlags, int count, int stride);

参数

target Specify how this buffer can be used within the graphics pipeline.
usageFlags Select what kind of update mode the buffer will have.
count 缓冲区中元素的数量。
stride 缓冲区中一个元素的大小。对于索引缓冲区,必须是 2 或 4 字节。

描述

创建图形缓冲区。

不再需要时,使用 Release 来释放该缓冲区。

If the buffer size exceeds the value in SystemInfo.maxGraphicsBufferSize, the constructor raises an exception.

Additional resources: Graphics.RenderPrimitives.


public GraphicsBuffer (GraphicsBuffer.Target target, int count, int stride);

参数

target Specify how this buffer can be used within the graphics pipeline.
count 缓冲区中元素的数量。
stride 缓冲区中一个元素的大小。对于索引缓冲区,必须是 2 或 4 字节。

描述

创建图形缓冲区。

不再需要时,使用 Release 来释放该缓冲区。

If the buffer size exceeds the value in SystemInfo.maxGraphicsBufferSize, the constructor raises an exception.

Additional resources: Graphics.RenderPrimitives.