1 | import { MSAA_QUALITY } from '@pixi/constants';
|
2 | import { Runner } from '@pixi/runner';
|
3 | import { BaseTexture } from '../textures/BaseTexture';
|
4 | import type { GLFramebuffer } from './GLFramebuffer';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class Framebuffer {
|
13 |
|
14 | width: number;
|
15 |
|
16 | height: number;
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | multisample: MSAA_QUALITY;
|
33 | stencil: boolean;
|
34 | depth: boolean;
|
35 | dirtyId: number;
|
36 | dirtyFormat: number;
|
37 | dirtySize: number;
|
38 | depthTexture: BaseTexture;
|
39 | colorTextures: Array<BaseTexture>;
|
40 | glFramebuffers: {
|
41 | [key: string]: GLFramebuffer;
|
42 | };
|
43 | disposeRunner: Runner;
|
44 | |
45 |
|
46 |
|
47 |
|
48 | constructor(width: number, height: number);
|
49 | /**
|
50 | * Reference to the colorTexture.
|
51 | * @readonly
|
52 | */
|
53 | get colorTexture(): BaseTexture;
|
54 | /**
|
55 | * Add texture to the colorTexture array.
|
56 | * @param index - Index of the array to add the texture to
|
57 | * @param texture - Texture to add to the array
|
58 | */
|
59 | addColorTexture(index?: number, texture?: BaseTexture): this;
|
60 | /**
|
61 | * Add a depth texture to the frame buffer.
|
62 | * @param texture - Texture to add.
|
63 | */
|
64 | addDepthTexture(texture?: BaseTexture): this;
|
65 | /** Enable depth on the frame buffer. */
|
66 | enableDepth(): this;
|
67 | /** Enable stencil on the frame buffer. */
|
68 | enableStencil(): this;
|
69 | /**
|
70 | * Resize the frame buffer
|
71 | * @param width - Width of the frame buffer to resize to
|
72 | * @param height - Height of the frame buffer to resize to
|
73 | */
|
74 | resize(width: number, height: number): void;
|
75 | /** Disposes WebGL resources that are connected to this geometry. */
|
76 | dispose(): void;
|
77 | /** Destroys and removes the depth texture added to this framebuffer. */
|
78 | destroyDepthTexture(): void;
|
79 | }
|