Class GLTFMeshPrimitive
Represents a single mesh primitive in a GLTF mesh.
Constructors
| Name | Description |
|---|---|
this
(owner)
|
Constructs a mesh primitive. |
Fields
| Name | Type | Description |
|---|---|---|
canRender
|
bool | True if the VAO and buffers are ready for rendering. |
eao
|
uint | Element array object. |
extras
|
dlib | Application-specific data. |
hasIndices
|
bool | Flags indicating the presence of indices. |
hasJoints
|
bool | Flags indicating the presence of joints. |
hasNormals
|
bool | Flags indicating the presence of normals. |
hasPositions
|
bool | Flags indicating the presence of vertex positions. |
hasTexcoords
|
bool | Flags indicating the presence of texcoords. |
hasWeights
|
bool | Flags indicating the presence of weights. |
indexAccessor
|
GLTFAccessor | Accessor for triangle indices. |
jbo
|
uint | Joint buffer object. |
joints0Accessor
|
GLTFAccessor | Accessor for joint indices (skinning). |
material
|
Material | Material used for rendering this primitive. |
nbo
|
uint | Normal buffer object. |
normalAccessor
|
GLTFAccessor | Accessor for vertex normals. |
positionAccessor
|
GLTFAccessor | Accessor for vertex positions. |
tbo
|
uint | Texture coordinate buffer object. |
texCoord0Accessor
|
GLTFAccessor | Accessor for texture coordinates. |
vao
|
uint | OpenGL vertex array object. |
vbo
|
uint | Vertex buffer object. |
wbo
|
uint | Weight buffer object. |
weights0Accessor
|
GLTFAccessor | Accessor for joint weights (skinning). |
Methods
| Name | Description |
|---|---|
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.