BBMOD_Model.submit

A function defined in BBMOD_Model.gml

submit([_materials[, _transform[, _batchData]]])

Description

Immediately submits the model for rendering.

Arguments

Name Type Description
_materials Array<Struct.BBMOD_IMaterial>, Array<Pointer.Texture> An array of either material structs or just textures if you don't wish to use BBMOD's material system. If undefined, then BBMOD_Model.Materials is used. Defaults to undefined.
_transform Array An array of dual quaternions for transforming animated models or undefined.
_batchData Array, Array<Array> Data for dynamic batching or undefined.

Returns

Struct.BBMOD_Model Returns self.

Example

// Render a terrain model (does not have animation data)
modTerrain.submit([mat_grass]);
// Render a character model (animated by animationPlayer)
modCharacter.submit([mat_head, mat_body], animationPlayer.get_transform());
bbmod_material_reset();

Note

Only parts of the model that use materials compatible with the current render pass are submitted! This method does not do anything if the model has not been loaded yet.

See also

BBMOD_AnimationPlayer.get_transform, BBMOD_ERenderPass, BBMOD_Resource.IsLoaded, bbmod_material_reset

Do you find this page helpful?

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