Skip to content

RenderStack

Overview

RenderProgram for repeated compositing of multiple RenderPrograms in a row with normal blending and source-over Porter-Duff composition.

RenderStack will apply normal compositing/blending to a list of RenderPrograms, where each RenderProgram in the list is drawn "on top" of all of the previous ones.

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class RenderStack

import { RenderStack } from 'scenerystack/alpenglow';

Constructor

new RenderStack( children : RenderProgram[] )

Instance Methods

getName() : string

withChildren( children : RenderProgram[] ) : RenderStack

getSimplified( children : RenderProgram[] ) : RenderProgram | null

(protected)

evaluate( context : RenderEvaluationContext ) : Vector4

writeInstructions( instructions : RenderInstruction[] )

serialize() : SerializedRenderStack

Static Methods

combine( a : Vector4, b : Vector4 ) : Vector4

deserialize( obj : SerializedRenderStack ) : RenderStack

Class RenderInstructionOpaqueJump

import { RenderInstructionOpaqueJump } from 'scenerystack/alpenglow';

Constructor

new RenderInstructionOpaqueJump( location : RenderInstructionLocation )

Instance Methods

toString() : string

equals( other : RenderInstruction, areLocationsEqual : ( a: RenderInstructionLocation, b: RenderInstructionLocation ) => boolean ) : boolean

execute( stack : RenderExecutionStack, context : RenderEvaluationContext, executor : RenderExecutor )

writeBinary( encoder : ByteEncoder, getOffset : ( location: RenderInstructionLocation ) => number )

getBinaryLength() : number

Static Methods

fromBinary( encoder : ByteEncoder, offset : number, getLocation : ( offset: number ) => RenderInstructionLocation ) : RenderInstructionOpaqueJump

Static Properties

SKIP_RENDER_COLOR_JUMPS

(readonly)

Class RenderInstructionStackBlend

Background on the top of the stack

import { RenderInstructionStackBlend } from 'scenerystack/alpenglow';

Instance Methods

toString() : string

equals( other : RenderInstruction, areLocationsEqual : ( a: RenderInstructionLocation, b: RenderInstructionLocation ) => boolean ) : boolean

execute( stack : RenderExecutionStack, context : RenderEvaluationContext, executor : RenderExecutor )

writeBinary( encoder : ByteEncoder, getOffset : ( location: RenderInstructionLocation ) => number )

getBinaryLength() : number

Static Properties

INSTANCE : RenderInstructionStackBlend

(readonly)

Type SerializedRenderStack

import type { SerializedRenderStack } from 'scenerystack/alpenglow';

Source Code

See the source for RenderStack.ts in the alpenglow repository.