LogoPixi’VN
pixi-jsClasses

Class: GpuLimitsSystem

Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.d.ts:28

The GpuLimitsSystem provides information about the capabilities and limitations of the underlying GPU. These limits, such as the maximum number of textures that can be used in a shader (maxTextures) or the maximum number of textures that can be batched together (maxBatchableTextures), are determined by the specific graphics hardware and driver.

The values for these limits are not available immediately upon instantiation of the class. They are populated when the WebGPU Device rendering context is successfully initialized and ready, which occurs after the renderer.init() method has completed. Attempting to access these properties before the context is ready will result in undefined or default values.

This system allows the renderer to adapt its behavior and resource allocation strategies to stay within the supported boundaries of the GPU, ensuring optimal performance and stability.

Example

const renderer = new WebGPURenderer();
await renderer.init(); // GPU limits are populated after this call

console.log(renderer.limits.maxTextures);
console.log(renderer.limits.maxBatchableTextures);

Advanced

Implements

Constructors

Constructor

> new GpuLimitsSystem(renderer): GpuLimitsSystem

Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.d.ts:39

Parameters

renderer

WebGPURenderer

Returns

GpuLimitsSystem

Properties

maxBatchableTextures

> maxBatchableTextures: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.d.ts:37

The maximum number of batchable textures


maxTextures

> maxTextures: number

Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.d.ts:35

The maximum number of textures that can be used by a shader

Methods

contextChange()

> contextChange(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.d.ts:40

Returns

void


destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/gpu/GpuLimitsSystem.d.ts:41

Generic destroy methods to be overridden by the subclass

Returns

void

Implementation of

System.destroy