Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ForwardSceneRenderPass

This class renders a SceneNode hierarchy. It uses one single program for rendering the whole scene. If different programs are necessary to render a scene, multiple SceneNodes should be used for each program that is used. This renderpass calls callbacks such as updateModelTransform, which have to be set by the renderer using this renderpass.

Hierarchy

Index

Constructors

constructor

Properties

Protected _altered

_altered: ChangeLookup & object = Object.assign(new ChangeLookup(), {any: false,camera: false,})

Alterable auxiliary object for tracking changes on render pass inputs and lazy updates.

Protected _camera

_camera: Camera
see

camera

Protected _clearColor

_clearColor: GLclampf4

Protected _context

_context: Context

Context, used to get context information and WebGL API access.

Protected _ndcOffset

_ndcOffset: GLfloat2
see

ndcOffset

Protected _program

_program: Program
see

program

Protected _scene

_scene: SceneNode | undefined
see

scene

Protected _target

_target: Framebuffer
see

target

updateModelTransform

updateModelTransform: function

Type declaration

    • (matrix: mat4): void
    • Parameters

      • matrix: mat4

      Returns void

updateViewProjectionTransform

updateViewProjectionTransform: function

Type declaration

    • (matrix: mat4): void
    • Parameters

      • matrix: mat4

      Returns void

Accessors

camera

  • set camera(camera: Camera): void

clearColor

initialized

  • get initialized(): boolean

ndcOffset

  • The NDC offset is used for vertex displacement within subpixel space for anti-aliasing over multiple intermediate frames (multi-frame sampling).

    Parameters

    • offset: GLfloat2

      Subpixel offset used for vertex displacement (multi-frame anti-aliasing).

    Returns void

program

  • set program(program: Program): void

scene

target

Methods

Protected assertInitialized

  • assertInitialized(): void
  • Asserts the objects initialization status to be true. Note that the implementation is cached and forwarded to either an empty function when initialized and to an acutal assert(false) otherwise.

    Returns void

Protected assertUninitialized

  • assertUninitialized(): undefined
  • Asserts the objects initialization status to be false. Note that the implementation is cached and forwarded to either an empty function when uninitialized and to an acutal assert(false) otherwise.

    Returns undefined

frame

  • frame(): void
  • Triggers rendering a frame of the given hierarchy. All nodes in the hierarchy will be visited recursively and rendered. If nodes contain transformations, they are applied and used for the whole subtree.

    Returns void

initialize

  • initialize(): boolean

prepare

  • prepare(): void

renderNode

  • renderNode(node: SceneNode, transform: mat4): void
  • Renders the current node and all children if there are any.

    Parameters

    • node: SceneNode

      Node to render

    • transform: mat4

      The transformation that should be applied to this node

    Returns void

uninitialize

  • uninitialize(): void

update

  • update(override?: boolean): void

Static Protected assertInitializedFalse

Static Protected assertUninitializedFalse

Static assert_initialized

Static assert_uninitialized

Static initialize

  • Method decorator for initialization of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be initialized, invokes its initialization with arbitrary number of parameters, and sets the initialization status to the initialization success (either false or true). In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to either a static, always-failing assert or an empty/undefined function.

    Returns MethodDecorator

Static uninitialize

  • Method decorator for uninitialization of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be uninitialized, invokes its uninitialization, and falsifies the initialization status. In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to a static, always-failing assert and an empty/undefined function respectively.

    Returns MethodDecorator