Class GLTFMeshPrimitive

Represents a single mesh primitive in a GLTF mesh.

class GLTFMeshPrimitive
  : dlib.core.ownership.Owner
  , Drawable;

Constructors

NameDescription
this (owner) Constructs a mesh primitive.

Fields

NameTypeDescription
canRender boolTrue if the VAO and buffers are ready for rendering.
eao uintElement array object.
extras dlib.container.dict.Trie!(dlib.serialization.json.JSONValue,string)Application-specific data.
hasIndices boolFlags indicating the presence of indices.
hasJoints boolFlags indicating the presence of joints.
hasNormals boolFlags indicating the presence of normals.
hasPositions boolFlags indicating the presence of vertex positions.
hasTexcoords boolFlags indicating the presence of texcoords.
hasWeights boolFlags indicating the presence of weights.
indexAccessor GLTFAccessorAccessor for triangle indices.
jbo uintJoint buffer object.
joints0Accessor GLTFAccessorAccessor for joint indices (skinning).
material MaterialMaterial used for rendering this primitive.
nbo uintNormal buffer object.
normalAccessor GLTFAccessorAccessor for vertex normals.
positionAccessor GLTFAccessorAccessor for vertex positions.
tbo uintTexture coordinate buffer object.
texCoord0Accessor GLTFAccessorAccessor for texture coordinates.
vao uintOpenGL vertex array object.
vbo uintVertex buffer object.
wbo uintWeight buffer object.
weights0Accessor GLTFAccessorAccessor for joint weights (skinning).

Methods

NameDescription
prepareVAO () Prepares OpenGL VAO and buffers for rendering. Sets up attribute pointers and uploads vertex/index data.
render (state) Renders the mesh primitive using the provided graphics pipeline state.

Description

Manages accessors for vertex attributes, OpenGL buffers, VAO creation, and rendering logic. Supports indexed and non-indexed drawing.