Top-level, internal rendering and pipeline manager within a WebGLRenderer.

  • ViewManager is owned by a single WebGLRenderer instance.
  • It manages all Views for a given Viewer.
  • Acts as the central coordinator for per-View state, rendering, and GPU resource management.
  • Owns and initializes the shared WebGL RenderContext and its underlying canvas element.
  • Instantiates and wires together the core pipeline managers:
    • GPUMemoryManager: Manages GPU-side storage, data textures, and memory uploads for all views.
    • MeshManager: Bridges scene/view state changes (transforms, colors, visibility, etc.) into GPU-ready render state for all views.
    • RenderManager: Executes draw passes for the currently active view, managing the render pipeline.
    • PickManager: Handles GPU-backed picking resources and queries for all views.
  • Tracks and manages ViewRenderState instances for each View, synchronizing per-view state and resources.
  • Handles view activation, moving/resizing the shared WebGL canvas to match the active view element, and snapshotting the previous view as needed.
  • Exposes the set of GPU-backed data textures (via dataTextures) for diagnostics.
  • The WebGLRenderer owns a single ViewManager.
  • The ViewManager manages all Views for the associated Viewer, supporting multi-view rendering.
  • It owns and coordinates all pipeline managers, ensuring that scene and view changes are efficiently reflected in GPU state and draw calls.
  • All per-view rendering, picking, and GPU resource management flows through the ViewManager and its managers.
  1. Constructed by WebGLRenderer.
  2. Initialized via init with a Viewer and memory configs.
  3. For each view added/removed: viewCreated / viewDestroyed.
  4. For each view update: viewUpdated.
  5. On shutdown: destroy.

Constructors

Properties

_activeView: ViewRenderState

Currently active renderer view.

The WebGL canvas is positioned/sized to this view’s HTML element.

_gpuMemoryManager: GPUMemoryManager

Owns GPU-side geometry/mesh buffers and data-texture uploads.

_meshManager: MeshManager

Translates scene/view changes into GPU uploads (transforms, colors, flags, etc.).

_pickManager: PickManager

Manages GPU picking resources and queries.

_rendererViews: Record<string, ViewRenderState> = {}

Map of view id -> renderer view wrapper.

_renderManager: RenderManager

Executes draw passes for the active view.

_snapManager: SnapManager

Manages GPU snap-to-vertex / snap-to-edge picking.

dataTextures: DataTextures = undefined

GPU-backed textures created/owned by GPUMemoryManager. Exposed for diagnostics. Available after init succeeds; undefined after destroy.

shaderInspector: ShaderInspector

Exposes shader source code for all techniques used by the renderer. Exposed for diagnostics. Available after init succeeds; undefined after destroy.

Accessors

Methods

  • Unregisters a View and releases its associated rendering resources.

    If the View is not registered with the manager, this method will return ok:true with no value, and will not throw an error, since it's possible for the viewer to update views that have not been added to the renderer (eg. if they were filtered out due to max view limits).

    Parameters

    • view: View

      The view to remove.

    Returns SDKResult<any>

    SDKResult indicating success.

  • Applies updates for a View and renders it.

    This will activate the view if it is not currently active, upload any queued GPU changes, and issue a render.

    If the View is not registered with the manager, this method will return ok:true with no value, and will not throw an error, since it's possible for the viewer to update views that have not been added to the renderer (eg. if they were filtered out due to max view limits).

    Parameters

    • view: View

      The view to update and render.

    Returns SDKResult<any>

    SDKResult from the render call, or ok:true if the view is not registered, which is OK.