CLASSES
TagsA - Z

RenderingManager

Description

class RenderingManager

Constructor

new RenderingManager(scene)

Builds a new Rendering manager object

Parameters

Name Type Description
scene Scene The scene linked to this rendering manager

Members

static MAX_RENDERINGGROUPS : number

The max id used for rendering groups (not included)

static MIN_RENDERINGGROUPS : number

The min id used for rendering groups (included)

static AUTOCLEAR : boolean

Used to globally prevent autoclearing scenes.

Methods

render(customRenderFunction, activeMeshes, renderParticles, renderSprites) void

Parameters

Name Type Description
customRenderFunction (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void
activeMeshes AbstractMesh[]
renderParticles boolean

reset() void

dispose() void

dispatchSprites(spriteManager) void

Parameters

Name Type Description
spriteManager SpriteManager

dispatchParticles(particleSystem) void

Parameters

Name Type Description
particleSystem ParticleSystem

dispatch(subMesh) void

Parameters

Name Type Description
subMesh SubMesh

setRenderingOrder(renderingGroupId, opaqueSortCompareFn, alphaTestSortCompareFn, transparentSortCompareFn) void

Overrides the default sort function applied in the renderging group to prepare the meshes.

This allowed control for front to back rendering or reversly depending of the special needs.

     * @param renderingGroupId The rendering group id corresponding to its index

Parameters

Name Type Description
renderingGroupId number The rendering group id corresponding to its index The rendering group id corresponding to its index
optional opaqueSortCompareFn (a: SubMesh, b: SubMesh) => number The opaque queue comparison function use to sort. The opaque queue comparison function use to sort.
optional alphaTestSortCompareFn (a: SubMesh, b: SubMesh) => number The alpha test queue comparison function use to sort. The alpha test queue comparison function use to sort.

setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil, depth, stencil) void

Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.

     * @param renderingGroupId The rendering group id corresponding to its index

Parameters

Name Type Description
renderingGroupId number The rendering group id corresponding to its index The rendering group id corresponding to its index
autoClearDepthStencil boolean Automatically clears depth and stencil between groups if true. Automatically clears depth and stencil between groups if true.
optional depth boolean Automatically clears depth between groups if true and autoClear is true.