/** * WebGL implementation of DrawCommands. * * @ignore */ export class WebglDrawCommands { /** * @param {number} indexSizeBytes - Size of index in bytes (1, 2 or 4). 0 for non-indexed. */ constructor(indexSizeBytes: number); /** @type {number} */ indexSizeBytes: number; /** @type {Int32Array|null} */ glCounts: Int32Array | null; /** @type {Int32Array|null} */ glOffsetsBytes: Int32Array | null; /** @type {Int32Array|null} */ glInstanceCounts: Int32Array | null; /** * Allocate SoA arrays for multi-draw. * @param {number} maxCount - Number of sub-draws. */ allocate(maxCount: number): void; /** * Write a single draw entry. * @param {number} i - Draw index. * @param {number} indexOrVertexCount - Count of indices/vertices. * @param {number} instanceCount - Instance count. * @param {number} firstIndexOrVertex - First index/vertex. */ add(i: number, indexOrVertexCount: number, instanceCount: number, firstIndexOrVertex: number): void; /** * Calculate primitives per sub-draw before accumulating, so strip overhead and incomplete * list primitives are handled separately for each instance. * @param {number} count - Number of active draws. * @param {number} type - Primitive topology. * @param {boolean} instanced - Whether to apply per-command instance counts. * @returns {number} Total primitive count. */ getPrimitiveCount(count: number, type: number, instanced: boolean): number; }