1 |
|
2 |
|
3 |
|
4 |
|
5 | import { GLSLContext, IAttribute, IAttributeInitializationOptions, IBuffer, IBufferInitializationOptions, IClearOptions, IComputeModel, IElements, IElementsInitializationOptions, IFramebuffer, IFramebufferInitializationOptions, IModel, IModelInitializationOptions, IReadPixelsOptions, IRendererConfig, IRendererService, ITexture2D, ITexture2DInitializationOptions } from '@antv/g-webgpu-core';
|
6 | import ReglFramebuffer from './ReglFramebuffer';
|
7 |
|
8 |
|
9 |
|
10 | export declare class WebGLEngine implements IRendererService {
|
11 | supportWebGPU: boolean;
|
12 | useWGSL: boolean;
|
13 | private $canvas;
|
14 | private gl;
|
15 | private inited;
|
16 | init(cfg: IRendererConfig): Promise<void>;
|
17 | isFloatSupported(): any;
|
18 | createModel: (options: IModelInitializationOptions) => Promise<IModel>;
|
19 | createAttribute: (options: IAttributeInitializationOptions) => IAttribute;
|
20 | createBuffer: (options: IBufferInitializationOptions) => IBuffer;
|
21 | createElements: (options: IElementsInitializationOptions) => IElements;
|
22 | createTexture2D: (options: ITexture2DInitializationOptions) => ITexture2D;
|
23 | createFramebuffer: (options: IFramebufferInitializationOptions) => ReglFramebuffer;
|
24 | useFramebuffer: (framebuffer: IFramebuffer | null, drawCommands: () => void) => void;
|
25 | createComputeModel: (context: GLSLContext) => Promise<IComputeModel>;
|
26 | clear: (options: IClearOptions) => void;
|
27 | setScissor: (scissor: Partial<{
|
28 | enable: boolean;
|
29 | box: {
|
30 | x: number;
|
31 | y: number;
|
32 | width: number;
|
33 | height: number;
|
34 | };
|
35 | }>) => void;
|
36 | viewport: ({ x, y, width, height, }: {
|
37 | x: number;
|
38 | y: number;
|
39 | width: number;
|
40 | height: number;
|
41 | }) => void;
|
42 | readPixels: (options: IReadPixelsOptions) => Uint8Array;
|
43 | getCanvas: () => HTMLCanvasElement;
|
44 | getGLContext: () => WebGLRenderingContext;
|
45 | destroy: () => void;
|
46 | beginFrame(): void;
|
47 | endFrame(): void;
|
48 | }
|