A utility class for managing a WebGL framebuffer used for picking. This framebuffer has 3 color attachments, and is designed to be used for rendering a single pixel for picking purposes.

Constructors

Properties

bound: boolean = false

Accessors

Methods

  • Reads the pixel data from the pick buffer's color attachments. This should be called after rendering to the pick buffer and before unbinding it.

    Returns { target0: Uint8Array<any>; target1: Uint8Array<any>; target2: Uint8Array<any> }

  • Handles WebGL context restoration by reinitializing the framebuffer and its attachments. This should be called when a WebGL context is restored after being lost.

    Parameters

    • gl: WebGL2RenderingContext

    Returns SDKResult<void>