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