Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RenderingManager

This is the manager responsible of all the rendering for meshes sprites and particles. It is enable to manage the different groups as well as the different necessary sort functions. This should not be used directly aside of the few static configurations

Hierarchy

  • RenderingManager

Index

Constructors

constructor

  • Instantiates a new rendering group for a particular scene

    Parameters

    • scene: Scene

      Defines the scene the groups belongs to

    Returns RenderingManager

Properties

Static AUTOCLEARSearch playground for AUTOCLEAR

AUTOCLEAR: boolean

Used to globally prevent autoclearing scenes.

Static MAX_RENDERINGGROUPSSearch playground for MAX_RENDERINGGROUPS

MAX_RENDERINGGROUPS: number

The max id used for rendering groups (not included)

Static MIN_RENDERINGGROUPSSearch playground for MIN_RENDERINGGROUPS

MIN_RENDERINGGROUPS: number

The min id used for rendering groups (included)

Methods

dispatchSearch playground for dispatch

  • Add a submesh to the manager in order to render it this frame

    Parameters

    • subMesh: SubMesh

      The submesh to dispatch

    • Optional mesh: AbstractMesh

      Optional reference to the submeshes's mesh. Provide if you have an exiting reference to improve performance.

    • Optional material: Nullable<Material>

      Optional reference to the submeshes's material. Provide if you have an exiting reference to improve performance.

    Returns void

dispatchParticlesSearch playground for dispatchParticles

  • Add a particle system to the rendering manager in order to render it this frame.

    Parameters

    Returns void

dispatchSpritesSearch playground for dispatchSprites

  • Add a sprite manager to the rendering manager in order to render it this frame.

    Parameters

    Returns void

freeRenderingGroupsSearch playground for freeRenderingGroups

  • freeRenderingGroups(): void
  • Clear the info related to rendering groups preventing retention points during dispose.

    Returns void

getAutoClearDepthStencilSetupSearch playground for getAutoClearDepthStencilSetup

  • Gets the current auto clear configuration for one rendering group of the rendering manager.

    Parameters

    • index: number

      the rendering group index to get the information for

    Returns IRenderingManagerAutoClearSetup

    The auto clear setup for the requested rendering group

setRenderingAutoClearDepthStencilSearch playground for setRenderingAutoClearDepthStencil

  • setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean, depth?: boolean, stencil?: boolean): void
  • Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.

    Parameters

    • renderingGroupId: number

      The rendering group id corresponding to its index

    • autoClearDepthStencil: boolean

      Automatically clears depth and stencil between groups if true.

    • Optional depth: boolean

      Automatically clears depth between groups if true and autoClear is true.

    • Optional stencil: boolean

      Automatically clears stencil between groups if true and autoClear is true.

    Returns void

setRenderingOrderSearch playground for setRenderingOrder

  • Overrides the default sort function applied in the rendering group to prepare the meshes. This allowed control for front to back rendering or reversely depending of the special needs.

    Parameters

    • renderingGroupId: number

      The rendering group id corresponding to its index

    • Optional opaqueSortCompareFn: Nullable<(a: SubMesh, b: SubMesh) => number>

      The opaque queue comparison function use to sort.

    • Optional alphaTestSortCompareFn: Nullable<(a: SubMesh, b: SubMesh) => number>

      The alpha test queue comparison function use to sort.

    • Optional transparentSortCompareFn: Nullable<(a: SubMesh, b: SubMesh) => number>

      The transparent queue comparison function use to sort.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method