BBMOD_IRenderable

An interface defined in BBMOD_IRenderable.gml

BBMOD_IRenderable()

Description

An interface describing renderable objects. Any struct or object that implements this interface can be rendered using a BBMOD_Renderer.

Methods

Name Description
render Enqueues the object for rendering.

Example

A renderable object:

/// @desc Create event
render = function ()
{
    var _matrix = matrix_build_identity();
    _matrix[@ 12] = x;
    _matrix[@ 13] = y;
    _matrix[@ 14] = z;
    matrix_set(matrix_world, _matrix);
    model.render();
    return self;
};

A renderable struct:

renderable = {
    position: new BBMOD_Vec3(),
    model: /* ... */,
    render: function () {
        var _matrix = matrix_build_identity();
        position.ToArray(_matrix, 12);
        matrix_set(matrix_world, _matrix);
        model.render();
        return self;
    },
};

Implemented in

BBMOD_AnimationPlayer, BBMOD_Model, BBMOD_Node

See also

BBMOD_BaseRenderer

Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on April 26, 2024 using GMDoc.