1 | import { BaseTexture } from './BaseTexture';
|
2 | import { GLTexture } from './GLTexture';
|
3 | import type { ExtensionMetadata } from '@pixi/extensions';
|
4 | import type { IRenderingContext } from '../IRenderer';
|
5 | import type { Renderer } from '../Renderer';
|
6 | import type { ISystem } from '../system/ISystem';
|
7 | import type { Texture } from './Texture';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class TextureSystem implements ISystem {
|
13 |
|
14 | static extension: ExtensionMetadata;
|
15 | |
16 |
|
17 |
|
18 |
|
19 | boundTextures: BaseTexture[];
|
20 | |
21 |
|
22 |
|
23 |
|
24 | managedTextures: Array<BaseTexture>;
|
25 |
|
26 | protected hasIntegerTextures: boolean;
|
27 | protected CONTEXT_UID: number;
|
28 | protected gl: IRenderingContext;
|
29 | protected internalFormats: {
|
30 | [type: number]: {
|
31 | [format: number]: number;
|
32 | };
|
33 | };
|
34 | protected webGLVersion: number;
|
35 | |
36 |
|
37 |
|
38 |
|
39 | protected unknownTexture: BaseTexture;
|
40 | |
41 |
|
42 |
|
43 |
|
44 | protected _unknownBoundTextures: boolean;
|
45 | |
46 |
|
47 |
|
48 |
|
49 | currentLocation: number;
|
50 | emptyTextures: {
|
51 | [key: number]: GLTexture;
|
52 | };
|
53 | private renderer;
|
54 | |
55 |
|
56 |
|
57 | constructor(renderer: Renderer);
|
58 | /** Sets up the renderer context and necessary buffers. */
|
59 | contextChange(): void;
|
60 | /**
|
61 | * Bind a texture to a specific location
|
62 | *
|
63 | * If you want to unbind something, please use `unbind(texture)` instead of `bind(null, textureLocation)`
|
64 | * @param texture - Texture to bind
|
65 | * @param [location=0] - Location to bind at
|
66 | */
|
67 | bind(texture: Texture | BaseTexture, location?: number): void;
|
68 | /** Resets texture location and bound textures Actual `bind(null, i)` calls will be performed at next `unbind()` call */
|
69 | reset(): void;
|
70 | /**
|
71 | * Unbind a texture.
|
72 | * @param texture - Texture to bind
|
73 | */
|
74 | unbind(texture?: BaseTexture): void;
|
75 | /**
|
76 | * Ensures that current boundTextures all have FLOAT sampler type,
|
77 | * see {@link PIXI.SAMPLER_TYPES} for explanation.
|
78 | * @param maxTextures - number of locations to check
|
79 | */
|
80 | ensureSamplerType(maxTextures: number): void;
|
81 | |
82 |
|
83 |
|
84 |
|
85 |
|
86 | initTexture(texture: BaseTexture): GLTexture;
|
87 | initTextureType(texture: BaseTexture, glTexture: GLTexture): void;
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 | updateTexture(texture: BaseTexture): void;
|
94 | |
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 | destroyTexture(texture: BaseTexture | Texture, skipRemove?: boolean): void;
|
101 | |
102 |
|
103 |
|
104 |
|
105 |
|
106 | updateTextureStyle(texture: BaseTexture): void;
|
107 | |
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 | setStyle(texture: BaseTexture, glTexture: GLTexture): void;
|
114 | destroy(): void;
|
115 | }
|