1681-engine / index / DrawCallCounter
Class: DrawCallCounter ​
Defined in: src/debug/DrawCallCounter.ts:15
Counts WebGL draw calls by wrapping the context's draw functions while it is installed, since Pixi 8 keeps no count of its own. Installed only while the debug overlay is open, so a closed overlay costs nothing; on WebGPU (no gl) it counts nothing and says so.
Constructors ​
Constructor ​
ts
new DrawCallCounter(renderer): DrawCallCounter;Defined in: src/debug/DrawCallCounter.ts:20
Parameters ​
| Parameter | Type |
|---|---|
renderer | Renderer |
Returns ​
DrawCallCounter
Accessors ​
supported ​
Get Signature ​
ts
get supported(): boolean;Defined in: src/debug/DrawCallCounter.ts:23
Whether this renderer can be counted (WebGL).
Returns ​
boolean
Methods ​
install() ​
ts
install(): void;Defined in: src/debug/DrawCallCounter.ts:27
Returns ​
void
take() ​
ts
take(): number;Defined in: src/debug/DrawCallCounter.ts:57
Draw calls since the last call, and starts counting again.
Returns ​
number
uninstall() ​
ts
uninstall(): void;Defined in: src/debug/DrawCallCounter.ts:51
Returns ​
void