Skip to main content

@novorender/api / RenderModuleContext

Interface: RenderModuleContext

Defined in: @novorender/src/core3d/modules/index.ts:46

A render module's context for a specific render context.

Remarks

This object should contain all GPU/render context specific resources and handle actual updates and rendering.

Methods

contextLost()

contextLost(): void;

Defined in: @novorender/src/core3d/modules/index.ts:75

Handle loss of underlying WebGLContext, e.g. by cancelling pending downloads.

Returns

void


dispose()

dispose(): void;

Defined in: @novorender/src/core3d/modules/index.ts:78

Dispose of all GPU resources.

Returns

void


render()

render(state): void;

Defined in: @novorender/src/core3d/modules/index.ts:72

Render into color and depth buffer.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void


update()

update(state): void;

Defined in: @novorender/src/core3d/modules/index.ts:54

Update module specific GPU state, such as uniform buffers.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void

Properties

module

readonly module: RenderModule;

Defined in: @novorender/src/core3d/modules/index.ts:48

Associated render module.


pick()?

readonly optional pick: (state) => void;

Defined in: @novorender/src/core3d/modules/index.ts:66

Render into pick buffers with module specific data.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void


prepass()?

readonly optional prepass: (state) => void;

Defined in: @novorender/src/core3d/modules/index.ts:60

Do a preliminary render pass to fill in Z-buffer for GPUs where this is beneficial.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void