A constructor defined in BBMOD_Mesh.gml
Implements BBMOD_IDestructible
new BBMOD_Mesh(_vertexFormat[, _model])
A mesh defined by vertex data, its format and the primitive type to use when it's drawn.
Name | Type | Description |
---|---|---|
_vertexFormat | Struct.BBMOD_VertexFormat |
The vertex format of the mesh or undefined . |
_model | Struct.BBMOD_Model |
The model to which the mesh belongs or undefined . |
Name | Description |
---|---|
BboxMax | The maximum coordinate of the mesh's bounding box. Available since model version 3.1. Can be undefined (default). |
BboxMin | The minimum coordinate of the mesh's bounding box. Available since model version 3.1. Can be undefined (default). |
Frozen | If true then the mesh is "frozen", which means it resides in the GPU memory, making it faster to draw, but also unmodifiable. |
MaterialIndex | An index of a material to use when drawing the mesh (if BBMOD_Mesh.Model is not undefined ). Default value is 0. |
Model | The model to which the mesh belongs or undefined (default). |
PrimitiveType | The primitive type of the mesh. Default is pr_trianglelist . |
VertexBuffer | A vertex buffer containing the raw mesh data or undefined (default). |
VertexFormat | The vertex format of the mesh. |
Name | Description |
---|---|
clone | Creates a clone of the mesh. |
copy | Copies mesh data into another mesh. |
destroy | Frees memory used by the struct. |
freeze | "Freezes" the mesh. This uploads its data to the GPU memory, which makes it draw faster but also makes it unmodifiable. |
from_buffer | Loads mesh data from a buffer following the BBMOD file format. |
render | Enqueues the mesh for rendering. |
submit | Immediately submits the mesh for rendering. |
to_buffer | Writes mesh data to a buffer following the current version of the BBMOD file format. |
update_bbox | Updates the mesh's bounding box using data from its vertex buffer, which must not be frozen! |
Copyright © 2025, BlueBurn. Built on January 04, 2025 using GMDoc.