Extends BBMOD_Class


new BBMOD_StaticBatch(_vformat)


A static batch is a structure that allows you to compose static models into a single one. Compared to BBMOD_Model.submit, this drastically reduces draw calls and increases performance, but requires more memory. Current limitation is that the added models must use the same single material.


Name Type Description
_vformat Struct.BBMOD_VertexFormat The vertex format of the static batch. All models added to the same static batch must have the same vertex format. This vertex format must not contain bone data!


Name Description
add Adds a model to the static batch.
finish Ends adding models into the static batch.
freeze Freezes the static batch. This makes it render faster, but disables adding more models.
render Enqueues the static batch for rendering.
start Begins adding models into the static batch.
submit Immediately submits the static batch for rendering.


modTree = new BBMOD_Model("Tree.bbmod");
var _vformat = modTree.get_vertex_format();
batch = new BBMOD_StaticBatch(_vformat);
with (OTree)
    var _transform = matrix_build(x, y, z, 0, 0, direction, 1, 1, 1);
    other.batch.add(other.modTree, _transform);

See also

BBMOD_DynamicBatch, BBMOD_Model.get_vertex_format

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on May 18, 2022 using GMDoc.