API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classAbstractWebGl2Renderer

@codexo/exojs / rendering / stable

Base class for WebGL2 renderers. Manages the connect/disconnect lifecycle and provides a safe `getBackend()` accessor that throws if the renderer is not connected. Subclasses must implement: - onConnect(backend): set up GL resources - onDisconnect(): tear down GL resources - render(drawable): batch or immediately draw the given drawable - flush(): submit any batched draw calls to the GPU

1
props
8
methods
0
events
Import
import { AbstractWebGl2Renderer } from '@codexo/exojs'

Base class for WebGL2 renderers.

Manages the connect/disconnect lifecycle and provides a safe `getBackend()` accessor that throws if the renderer is not connected.

Subclasses must implement: - onConnect(backend): set up GL resources - onDisconnect(): tear down GL resources - render(drawable): batch or immediately draw the given drawable - flush(): submit any batched draw calls to the GPU

Constructors 1
new(): AbstractWebGl2Renderer<Target>
Methods 8
connect(backend: WebGl2Backend): void
disconnect(): void
flush(): void
getBackend(): WebGl2Backend
getBackendOrNull(): WebGl2Backend | null
onConnect(backend: WebGl2Backend): void
onDisconnect(): void
render(drawable: Target): void
Properties 1
backendType: WebGl2
Source