import { IRenderbuffer , IRenderbufferInitializationOptions , } from '@antv/g-webgpu-core' ; import regl from 'regl' ; import { formatMap } from './constants' ; see https export default class ReglRenderbuffer implements IRenderbuffer { private renderbuffer : regl . Renderbuffer ; constructor ( reGl , options ) { const { width , height , format } = options ; this . renderbuffer = reGl . renderbuffer ( { width , height , format : formatMap [ format ] as regl . RenderbufferFormat , } ) ; } public get ( ) { return this . renderbuffer ; } public destroy ( ) { this . renderbuffer . destroy ( ) ; } public resize ( { width , height } ) { this . renderbuffer . resize ( width , height ) ; } }