Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RenderingSubMesh

Sub mesh for rendering which contains all geometry data, it can be used to create InputAssembler.

Hierarchy

  • RenderingSubMesh

Index

Constructors

constructor

Properties

Private _attributes

_attributes: Attribute[]

Private _flatBuffers

_flatBuffers: IFlatBuffer[] = []

Private Optional _geometricInfo

_geometricInfo: IGeometricInfo

Private _handle

_handle: SubMeshHandle = NULL_HANDLE

Private _iaInfo

Private _indexBuffer

_indexBuffer: Buffer | null = null

Private _indirectBuffer

_indirectBuffer: Buffer | null = null

Private Optional _jointMappedBufferIndices

_jointMappedBufferIndices: number[]

Private Optional _jointMappedBuffers

_jointMappedBuffers: Buffer[]

Private _primitiveMode

_primitiveMode: PrimitiveMode

Private _vertexBuffers

_vertexBuffers: Buffer[]

Private Optional vertexIdChannel

vertexIdChannel: undefined | { index: number; stream: number }

Optional mesh

mesh: Mesh

Optional subMeshIdx

subMeshIdx: undefined | number

Accessors

attributes

flatBuffers

geometricInfo

handle

  • get handle(): IHandle<SUB_MESH>

iaInfo

indexBuffer

  • get indexBuffer(): null | Buffer

indirectBuffer

  • get indirectBuffer(): null | Buffer

jointMappedBuffers

  • get jointMappedBuffers(): Buffer[]

primitiveMode

vertexBuffers

  • get vertexBuffers(): Buffer[]

Methods

Private allocVertexIdBuffer

destroy

  • destroy(): void

enableVertexIdChannel

  • enableVertexIdChannel(device: Device): void
  • Adds a vertex attribute input called 'a_vertexId' into this sub-mesh. This is useful if you want to simulate gl_VertexId in WebGL context prior to 2.0. Once you call this function, the vertex attribute is permanently added. Subsequent calls to this function take no effect.

    Parameters

    • device: Device

      Device used to create related rendering resources.

    Returns void

genFlatBuffers

  • genFlatBuffers(): void

Generated using TypeDoc