Class Renderer

A render unit. Base class for all renderables.

Methods

Renderer() constructor
Creates new instance of Renderer.
preRender(driver, session) method

Called when this renderer needs to be rendered.

Parameters
driver : VideoNullDriver — Active video driver.
session : RenderSession — Active session.
Returns
void
begin(driver, session) method

Called after preRender but before GameObject#onRender. Used to compute world alpha, color and blend mode.

Parameters
driver : VideoNullDriversession : RenderSession
upload(driver, session) method

Called if skipSelf equals to false. Used to upload everything onto gpu.

Parameters
driver : VideoNullDriversession : RenderSession
render(driver, session) method

Called if skipSelf equals to false.

Parameters
driver : VideoNullDriver — Active video driver.
session : RenderSession
Returns
void
end(driver, session) method

Called after all children objects got rendered.

Parameters
driver : VideoNullDriversession : RenderSession
getColoredTexture(texture, color) static method

Tints given texture with a given color.

Parameters
texture : Texturecolor : number | null
Returns
Texture

Properties

gameObject property

parent property

skipUnchangedFrames static property
Indicates whenever engine should render the stage if nothing were changed in this frame. Default is false.