API reference

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

C

classAbstractWebGl2BatchedRenderer

@codexo/exojs / rendering / stable

Specialization of AbstractWebGl2Renderer for renderers that batch many drawables of the same type into one or two GPU draw calls (sprite batches, particle batches). Subclasses fill the shared vertex + index buffers and call `flush()` either when the buffer is full or when the active batched renderer changes.

17
props
14
methods
0
events
Import
import { AbstractWebGl2BatchedRenderer } from '@codexo/exojs'

Specialization of AbstractWebGl2Renderer for renderers that batch many drawables of the same type into one or two GPU draw calls (sprite batches, particle batches). Subclasses fill the shared vertex + index buffers and call `flush()` either when the buffer is full or when the active batched renderer changes.

Constructors 1
new(batchSize: number, attributeCount: number, vertexSource: string, fragmentSource: string): AbstractWebGl2BatchedRenderer
Methods 14
connect(backend: WebGl2Backend): void
createBufferRuntime(connection: RendererConnection): WebGl2RenderBufferRuntime
createConnection(gl: WebGL2RenderingContext): RendererConnection
createVao(gl: WebGL2RenderingContext, indexBuffer: WebGl2RenderBuffer, vertexBuffer: WebGl2RenderBuffer): WebGl2VertexArrayObject
createVaoRuntime(connection: RendererConnection): WebGl2VertexArrayObjectRuntime
destroy(): void
disconnect(): void
flush(): void
getBackend(): WebGl2Backend
getBackendOrNull(): WebGl2Backend | null
onConnect(backend: WebGl2Backend): void
onDisconnect(): void
render(drawable: Drawable): void
updateView(view: View): void
Properties 17
attributeCount: number
backendType: WebGl2
batchIndex: number
batchSize: number
connection: RendererConnection | null
currentBlendMode: BlendModes | null
currentTexture: RenderTexture | Texture | null
currentView: View | null
currentViewId: number
float32View: Float32Array
indexBuffer: WebGl2RenderBuffer | null
indexData: Uint16Array
shader: Shader
uint32View: Uint32Array
vao: WebGl2VertexArrayObject | null
vertexBuffer: WebGl2RenderBuffer | null
vertexData: ArrayBuffer
Source