Version: 2021.3
언어: 한국어

Target

enumeration

매뉴얼로 전환

설명

The intended usage of a GraphicsBuffer.

You must supply the intended usage (target) when creating a GraphicsBuffer; for example, pass GraphicsBuffer.Target.Index for a buffer to be usable as a geometry index buffer.

Not all usages are supported on all platforms and devices. In particular, any target usage flags that are not Vertex, Index or Constant require compute shaders to be supported (see SystemInfo.supportsComputeShaders).

These values can be combined; for example, GraphicsBuffer.Target.Index | GraphicsBuffer.Target.Raw creates a buffer that can be used both as an index buffer in a Graphics.DrawProcedural call, and as a "raw" byte address buffer in a compute shader.

DirectX 11 does not allow Index or ::Vertex buffers to also be Structured. For compute shader mesh data access with DirectX 11 compatibility, it is best to use Raw.

See Also: GraphicsBuffer class, GraphicsBuffer constructor, Mesh.vertexBufferTarget, Mesh.indexBufferTarget.

변수

VertexGraphicsBuffer can be used as a vertex buffer.
IndexGraphicsBuffer can be used as an index buffer.
CopySourceGraphicsBuffer can be used as a source for CopyBuffer.
CopyDestinationGraphicsBuffer can be used as a destination for CopyBuffer.
StructuredGraphicsBuffer can be used as a structured buffer.
RawGraphicsBuffer can be used as a raw byte-address buffer.
AppendGraphicsBuffer can be used as an append-consume buffer.
CounterGraphicsBuffer with an internal counter.
IndirectArgumentsGraphicsBuffer can be used as an indirect argument buffer for indirect draws and dispatches.
ConstantGraphicsBuffer can be used as a constant buffer (uniform buffer).