1 | import { BufferData, IBuffer, IBufferInitializationOptions } 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 ReglBuffer implements IBuffer {
|
8 | private buffer;
|
9 | constructor(reGl: regl.Regl, options: IBufferInitializationOptions);
|
10 | get(): regl.Buffer;
|
11 | destroy(): void;
|
12 | subData({ data, offset }: {
|
13 | data: BufferData;
|
14 | offset: number;
|
15 | }): void;
|
16 | }
|