Creates a new WebGLPickBuffer instance. Note that this does not allocate the framebuffer or its attachments; you must call WebGLPickBuffer.init to do so.
Returns true if the pick buffer has been successfully allocated and initialized, false otherwise.
Binds the pick buffer's framebuffer for rendering.
Clears the pick buffer's framebuffer. This should be called after WebGLPickBuffer.bind and before rendering to the pick buffer. After calling this, the color attachments will be cleared to (0, 0, 0, 0).
Initializes the framebuffer and its attachments. This must be called before using the pick buffer. If initialization fails, an error result is returned.
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.
Unbinds the pick buffer's framebuffer, restoring rendering to the default framebuffer. After calling this, the pick buffer will no longer be bound and cannot be read from until WebGLPickBuffer.bind is called again.
Handles WebGL context restoration by reinitializing the framebuffer and its attachments. This should be called when a WebGL context is restored after being lost.
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.