Skip to main content

@novorender/web_app / RenderModuleContext

Interface: RenderModuleContext

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

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

Returns

void

Defined in

@novorender/core3d/modules/index.ts:50


dispose()

dispose(): void

Dispose of all GPU resources.

Returns

void

Defined in

@novorender/core3d/modules/index.ts:53


render()

render(state): void

Render into color and depth buffer.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void

Defined in

@novorender/core3d/modules/index.ts:47


update()

update(state): void

Update module specific GPU state, such as uniform buffers.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void

Defined in

@novorender/core3d/modules/index.ts:29

Properties

module

readonly module: RenderModule;

Associated render module.

Defined in

@novorender/core3d/modules/index.ts:23


pick()?

readonly optional pick: (state) => void;

Render into pick buffers with module specific data.

Parameters

ParameterTypeDescription
stateDerivedRenderStateThe current frame render state.

Returns

void

Defined in

@novorender/core3d/modules/index.ts:41


prepass()?

readonly optional prepass: (state) => void;

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

Defined in

@novorender/core3d/modules/index.ts:35