1 | import { Resource } from './Resource';
|
2 | import type { ISize } from '@pixi/math';
|
3 | import type { BaseTexture } from '../BaseTexture';
|
4 | import type { Renderer } from '../../Renderer';
|
5 | import type { GLTexture } from '../GLTexture';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class BufferResource extends Resource {
|
14 |
|
15 | data: Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | constructor(source: Float32Array | Uint8Array | Uint16Array | Int32Array | Uint32Array, options: ISize);
|
23 | /**
|
24 | * Upload the texture to the GPU.
|
25 | * @param renderer - Upload to the renderer
|
26 | * @param baseTexture - Reference to parent texture
|
27 | * @param glTexture - glTexture
|
28 | * @returns - true is success
|
29 | */
|
30 | upload(renderer: Renderer, baseTexture: BaseTexture, glTexture: GLTexture): boolean;
|
31 | /** Destroy and don't use after this. */
|
32 | dispose(): void;
|
33 | /**
|
34 | * Used to auto-detect the type of resource.
|
35 | * @param {*} source - The source object
|
36 | * @returns {boolean} `true` if <canvas>
|
37 | */
|
38 | static test(source: unknown): source is Float32Array | Uint8Array | Uint32Array;
|
39 | }
|