GraphicsBuffer
Create a Graphics Buffer.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Constructor
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GraphicsBuffer(Target, int, int)
Create a Graphics Buffer.
public GraphicsBuffer(GraphicsBuffer.Target target, int count, int stride)
Parameters
Remarks
Use GraphicsBuffer.Release to release the buffer when no longer needed.
If the buffer size exceeds the value in SystemInfo.maxGraphicsBufferSize, the constructor raises an exception.
Additional Resources: Graphics.RenderPrimitives.
GraphicsBuffer(Target, UsageFlags, int, int)
Create a Graphics Buffer.
public GraphicsBuffer(GraphicsBuffer.Target target, GraphicsBuffer.UsageFlags usageFlags, int count, int stride)
Parameters
Specify how this buffer can be used within the graphics pipeline.
Select what kind of update mode the buffer will have.
Number of elements in the buffer.
Size of one element in the buffer. For index buffers, this must be either 2 or 4 bytes.
Remarks
Use GraphicsBuffer.Release to release the buffer when no longer needed.
If the buffer size exceeds the value in SystemInfo.maxGraphicsBufferSize, the constructor raises an exception.
Additional Resources: Graphics.RenderPrimitives.