PrimitiveState¶
data class PrimitiveState(
val topology: GPUPrimitiveTopology = GPUPrimitiveTopology.TriangleList,
val stripIndexFormat: GPUIndexFormat? = null,
val frontFace: GPUFrontFace = GPUFrontFace.CCW,
val cullMode: GPUCullMode = GPUCullMode.None,
val unclippedDepth: Boolean = false
) : GPUPrimitiveState
Constructors¶
PrimitiveState¶
constructor(
topology: GPUPrimitiveTopology = GPUPrimitiveTopology.TriangleList,
stripIndexFormat: GPUIndexFormat? = null,
frontFace: GPUFrontFace = GPUFrontFace.CCW,
cullMode: GPUCullMode = GPUCullMode.None,
unclippedDepth: Boolean = false
)
Properties¶
cullMode¶
open override val cullMode: GPUCullMode
Defines which polygon orientation will be culled, if any.
frontFace¶
open override val frontFace: GPUFrontFace
Defines which polygons are considered front-facing.
stripIndexFormat¶
open override val stripIndexFormat: GPUIndexFormat?
For pipelines with strip topologies ("line-strip" or "triangle-strip"), this determines the index buffer format and primitive restart value ("uint16"/0xFFFF or "uint32"/0xFFFFFFFF). It is not allowed on pipelines with non-strip topologies. Note: Some implementations require knowledge of the primitive restart value to compile pipeline state objects.
topology¶
open override val topology: GPUPrimitiveTopology
The type of primitive to be constructed from the vertex inputs.
unclippedDepth¶
open override val unclippedDepth: Boolean
If true, indicates that depth clipping is disabled. Requires the "depth-clip-control" feature to be enabled.