BBMOD_StaticBatch.add

A function defined in BBMOD_StaticBatch.gml

add(_model, _transform)

Description

Adds a model to the static batch.

Arguments

Name Type Description
_model Struct.BBMOD_Model The model.
_transform Array A transformation matrix of the model.

Returns

Struct.BBMOD_StaticBatch Returns self.

Example

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

Note

You must first call BBMOD_StaticBatch.begin before using this function!

See also

BBMOD_StaticBatch.finish

Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on January 21, 2024 using GMDoc.