@rekhly/renderer-webgl10 exported symbols — see also the package guide.
interface AcquiredWebGL2| gl | WebGL2RenderingContext |
| device | RendererDevice |
Acquire WebGL2 and report whether it is GPU or software.
(canvas: RenderTarget, options?: AcquireWebGL2Options) => AcquiredWebGL2Acquire a WebGL2 context. 1. Hardware `getContext("webgl2")` when the GPU/driver provides it. 2. Otherwise Rekhly's software WebGL2 (same renderer, no GPU). Callers must only invoke this when WebGL2 is the chosen backend. A live hardware WebGL context cannot later be reused for Canvas 2D.
(canvas: RenderTarget, options?: AcquireWebGL2Options) => WebGL2RenderingContextinterface AcquireWebGL2Options| powerPreference? | "default" | "high-performance" | "low-power" | undefined |
| failIfMajorPerformanceCaveat? | boolean | undefined |
| allowSoftware? | boolean | undefined |
CPU WebGL2 context that implements the subset Rekhly's core renderer uses. Same shader contract as the GPU path: clip-space `a_position` + `u_color`. Used when `getContext("webgl2")` is missing (headless CI, no GPU, VM).
(canvas: RenderTarget) => WebGL2RenderingContextRead the software framebuffer. `undefined` on a hardware context.
(gl: WebGL2RenderingContext) => Uint8ClampedArray | undefinedRecycle WebGL buffer objects so repeated uploads of similar sizes do not allocate a new GPU buffer every frame.
class GpuBufferPool`true` when `gl` is Rekhly's CPU WebGL2 implementation (no GPU).
(gl: WebGL2RenderingContext) => booleanWebGL2 backend — the **core** Rekhly renderer. Uses a hardware `webgl2` context when a GPU is present. Without a GPU it runs the same renderer against a software WebGL2 implementation. Chart packages must not import this class. Use `createRenderer` from `@rekhly/engine` instead.
class WebGL2RendererOptions for {@link WebGL2Renderer}.
interface WebGL2RendererOptions| canvas | RenderTarget |
| gl? | WebGL2RenderingContext | undefined |
| powerPreference? | "default" | "high-performance" | "low-power" | undefined |
| failIfMajorPerformanceCaveat? | boolean | undefined |
| allowSoftware? | boolean | undefined |
Got any questions? I'm happy to help with products, licensing, and examples.