1 | import { ITexture2D, ITexture2DInitializationOptions } from '@antv/g-webgpu-core';
|
2 | import regl from 'regl';
|
3 | /**
|
4 | * adaptor for regl.Buffer
|
5 | * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#buffers
|
6 | */
|
7 | export default class ReglTexture2D implements ITexture2D {
|
8 | private texture;
|
9 | private width;
|
10 | private height;
|
11 | constructor(reGl: regl.Regl, options: ITexture2DInitializationOptions);
|
12 | get(): regl.Texture2D;
|
13 | update(): void;
|
14 | resize({ width, height }: {
|
15 | width: number;
|
16 | height: number;
|
17 | }): void;
|
18 | destroy(): void;
|
19 | }
|