• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *   http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * WebGL 1.0
18 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
19 * @since 7
20 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
21 */
22type GLenum = number;
23/**
24 * WebGL 1.0
25 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
26 * @since 7
27 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
28 */
29type GLboolean = boolean;
30/**
31 * WebGL 1.0
32 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
33 * @since 7
34 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
35 */
36type GLbitfield = number;
37/**
38 * WebGL 1.0
39 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
40 * @since 7
41 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
42 */
43type GLbyte = number;
44/**
45 * WebGL 1.0
46 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
47 * @since 7
48 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
49 */
50type GLshort = number;
51/**
52 * WebGL 1.0
53 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
54 * @since 7
55 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
56 */
57type GLint = number;
58/**
59 * WebGL 1.0
60 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
61 * @since 7
62 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
63 */
64type GLsizei = number;
65/**
66 * WebGL 1.0
67 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
68 * @since 7
69 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
70 */
71type GLintptr = number;
72/**
73 * WebGL 1.0
74 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
75 * @since 7
76 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
77 */
78type GLsizeiptr = number;
79/**
80 * WebGL 1.0
81 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
82 * @since 7
83 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
84 */
85type GLubyte = number;
86/**
87 * WebGL 1.0
88 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
89 * @since 7
90 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
91 */
92type GLushort = number;
93/**
94 * WebGL 1.0
95 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
96 * @since 7
97 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
98 */
99type GLuint = number;
100/**
101 * WebGL 1.0
102 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
103 * @since 7
104 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
105 */
106type GLfloat = number;
107/**
108 * WebGL 1.0
109 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
110 * @since 7
111 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
112 */
113type GLclampf = number;
114/**
115 * WebGL 1.0
116 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
117 * @since 7
118 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
119 */
120type TexImageSource = ImageData;
121/**
122 * WebGL 1.0
123 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
124 * @since 7
125 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
126 */
127type Float32List = Float32Array | GLfloat[];
128/**
129 * WebGL 1.0
130 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
131 * @since 7
132 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
133 */
134type Int32List = Int32Array | GLint[];
135/**
136 * WebGL 1.0
137 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
138 * @since 7
139 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
140 */
141type WebGLPowerPreference = "default" | "low-power" | "high-performance";
142/**
143 * WebGL 1.0
144 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
145 * @since 7
146 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
147 */
148export interface WebGLContextAttributes {
149    alpha?: boolean;
150    depth?: boolean;
151    stencil?: boolean;
152    antialias?: boolean;
153    premultipliedAlpha?: boolean;
154    preserveDrawingBuffer?: boolean;
155    powerPreference?: WebGLPowerPreference;
156    failIfMajorPerformanceCaveat?: boolean;
157    desynchronized?: boolean;
158}
159/**
160 * WebGL 1.0
161 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
162 * @since 7
163 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
164 */
165interface WebGLBuffer {
166}
167/**
168 * WebGL 1.0
169 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
170 * @since 7
171 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
172 */
173interface WebGLFramebuffer {
174}
175/**
176 * WebGL 1.0
177 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
178 * @since 7
179 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
180 */
181interface WebGLProgram {
182}
183/**
184 * WebGL 1.0
185 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
186 * @since 7
187 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
188 */
189interface WebGLRenderbuffer {
190}
191/**
192 * WebGL 1.0
193 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
194 * @since 7
195 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
196 */
197interface WebGLShader {
198}
199/**
200 * WebGL 1.0
201 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
202 * @since 7
203 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
204 */
205interface WebGLTexture {
206}
207/**
208 * WebGL 1.0
209 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
210 * @since 7
211 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
212 */
213interface WebGLUniformLocation {
214}
215/**
216 * WebGL 1.0
217 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
218 * @since 7
219 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
220 */
221interface WebGLActiveInfo {
222    readonly size: GLint;
223    readonly type: GLenum;
224    readonly name: string;
225}
226/**
227 * WebGL 1.0
228 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
229 * @since 7
230 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
231 */
232interface WebGLShaderPrecisionFormat {
233    readonly rangeMin: GLint;
234    readonly rangeMax: GLint;
235    readonly precision: GLint;
236}
237
238/**
239 * WebGL 1.0
240 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
241 * @since 7
242 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
243 */
244interface WebGLRenderingContextBase {
245    readonly DEPTH_BUFFER_BIT: GLenum;
246    readonly STENCIL_BUFFER_BIT: GLenum;
247    readonly COLOR_BUFFER_BIT: GLenum;
248    readonly POINTS: GLenum;
249    readonly LINES: GLenum;
250    readonly LINE_LOOP: GLenum;
251    readonly LINE_STRIP: GLenum;
252    readonly TRIANGLES: GLenum;
253    readonly TRIANGLE_STRIP: GLenum;
254    readonly TRIANGLE_FAN: GLenum;
255    readonly ZERO: GLenum;
256    readonly ONE: GLenum;
257    readonly SRC_COLOR: GLenum;
258    readonly ONE_MINUS_SRC_COLOR: GLenum;
259    readonly SRC_ALPHA: GLenum;
260    readonly ONE_MINUS_SRC_ALPHA: GLenum;
261    readonly DST_ALPHA: GLenum;
262    readonly ONE_MINUS_DST_ALPHA: GLenum;
263    readonly DST_COLOR: GLenum;
264    readonly ONE_MINUS_DST_COLOR: GLenum;
265    readonly SRC_ALPHA_SATURATE: GLenum;
266    readonly FUNC_ADD: GLenum;
267    readonly BLEND_EQUATION: GLenum;
268    readonly BLEND_EQUATION_RGB: GLenum;
269    readonly BLEND_EQUATION_ALPHA: GLenum;
270    readonly FUNC_SUBTRACT: GLenum;
271    readonly FUNC_REVERSE_SUBTRACT: GLenum;
272    readonly BLEND_DST_RGB: GLenum;
273    readonly BLEND_SRC_RGB: GLenum;
274    readonly BLEND_DST_ALPHA: GLenum;
275    readonly BLEND_SRC_ALPHA: GLenum;
276    readonly CONSTANT_COLOR: GLenum;
277    readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
278    readonly CONSTANT_ALPHA: GLenum;
279    readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
280    readonly BLEND_COLOR: GLenum;
281    readonly ARRAY_BUFFER: GLenum;
282    readonly ELEMENT_ARRAY_BUFFER: GLenum;
283    readonly ARRAY_BUFFER_BINDING: GLenum;
284    readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
285    readonly STREAM_DRAW: GLenum;
286    readonly STATIC_DRAW: GLenum;
287    readonly DYNAMIC_DRAW: GLenum;
288    readonly BUFFER_SIZE: GLenum;
289    readonly BUFFER_USAGE: GLenum;
290    readonly CURRENT_VERTEX_ATTRIB: GLenum;
291    readonly FRONT: GLenum;
292    readonly BACK: GLenum;
293    readonly FRONT_AND_BACK: GLenum;
294    readonly CULL_FACE: GLenum;
295    readonly BLEND: GLenum;
296    readonly DITHER: GLenum;
297    readonly STENCIL_TEST: GLenum;
298    readonly DEPTH_TEST: GLenum;
299    readonly SCISSOR_TEST: GLenum;
300    readonly POLYGON_OFFSET_FILL: GLenum;
301    readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
302    readonly SAMPLE_COVERAGE: GLenum;
303    readonly NO_ERROR: GLenum;
304    readonly INVALID_ENUM: GLenum;
305    readonly INVALID_VALUE: GLenum;
306    readonly INVALID_OPERATION: GLenum;
307    readonly OUT_OF_MEMORY: GLenum;
308    readonly CW: GLenum;
309    readonly CCW: GLenum;
310    readonly LINE_WIDTH: GLenum;
311    readonly ALIASED_POINT_SIZE_RANGE: GLenum;
312    readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
313    readonly CULL_FACE_MODE: GLenum;
314    readonly FRONT_FACE: GLenum;
315    readonly DEPTH_RANGE: GLenum;
316    readonly DEPTH_WRITEMASK: GLenum;
317    readonly DEPTH_CLEAR_VALUE: GLenum;
318    readonly DEPTH_FUNC: GLenum;
319    readonly STENCIL_CLEAR_VALUE: GLenum;
320    readonly STENCIL_FUNC: GLenum;
321    readonly STENCIL_FAIL: GLenum;
322    readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
323    readonly STENCIL_PASS_DEPTH_PASS: GLenum;
324    readonly STENCIL_REF: GLenum;
325    readonly STENCIL_VALUE_MASK: GLenum;
326    readonly STENCIL_WRITEMASK: GLenum;
327    readonly STENCIL_BACK_FUNC: GLenum;
328    readonly STENCIL_BACK_FAIL: GLenum;
329    readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
330    readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
331    readonly STENCIL_BACK_REF: GLenum;
332    readonly STENCIL_BACK_VALUE_MASK: GLenum;
333    readonly STENCIL_BACK_WRITEMASK: GLenum;
334    readonly VIEWPORT: GLenum;
335    readonly SCISSOR_BOX: GLenum;
336    readonly COLOR_CLEAR_VALUE: GLenum;
337    readonly COLOR_WRITEMASK: GLenum;
338    readonly UNPACK_ALIGNMENT: GLenum;
339    readonly PACK_ALIGNMENT: GLenum;
340    readonly MAX_TEXTURE_SIZE: GLenum;
341    readonly MAX_VIEWPORT_DIMS: GLenum;
342    readonly SUBPIXEL_BITS: GLenum;
343    readonly RED_BITS: GLenum;
344    readonly GREEN_BITS: GLenum;
345    readonly BLUE_BITS: GLenum;
346    readonly ALPHA_BITS: GLenum;
347    readonly DEPTH_BITS: GLenum;
348    readonly STENCIL_BITS: GLenum;
349    readonly POLYGON_OFFSET_UNITS: GLenum;
350    readonly POLYGON_OFFSET_FACTOR: GLenum;
351    readonly TEXTURE_BINDING_2D: GLenum;
352    readonly SAMPLE_BUFFERS: GLenum;
353    readonly SAMPLES: GLenum;
354    readonly SAMPLE_COVERAGE_VALUE: GLenum;
355    readonly SAMPLE_COVERAGE_INVERT: GLenum;
356    readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
357    readonly DONT_CARE: GLenum;
358    readonly FASTEST: GLenum;
359    readonly NICEST: GLenum;
360    readonly GENERATE_MIPMAP_HINT: GLenum;
361    readonly BYTE: GLenum;
362    readonly UNSIGNED_BYTE: GLenum;
363    readonly SHORT: GLenum;
364    readonly UNSIGNED_SHORT: GLenum;
365    readonly INT: GLenum;
366    readonly UNSIGNED_INT: GLenum;
367    readonly FLOAT: GLenum;
368    readonly DEPTH_COMPONENT: GLenum;
369    readonly ALPHA: GLenum;
370    readonly RGB: GLenum;
371    readonly RGBA: GLenum;
372    readonly LUMINANCE: GLenum;
373    readonly LUMINANCE_ALPHA: GLenum;
374    readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
375    readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
376    readonly UNSIGNED_SHORT_5_6_5: GLenum;
377    readonly FRAGMENT_SHADER: GLenum;
378    readonly VERTEX_SHADER: GLenum;
379    readonly MAX_VERTEX_ATTRIBS: GLenum;
380    readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
381    readonly MAX_VARYING_VECTORS: GLenum;
382    readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
383    readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
384    readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
385    readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
386    readonly SHADER_TYPE: GLenum;
387    readonly DELETE_STATUS: GLenum;
388    readonly LINK_STATUS: GLenum;
389    readonly VALIDATE_STATUS: GLenum;
390    readonly ATTACHED_SHADERS: GLenum;
391    readonly ACTIVE_UNIFORMS: GLenum;
392    readonly ACTIVE_ATTRIBUTES: GLenum;
393    readonly SHADING_LANGUAGE_VERSION: GLenum;
394    readonly CURRENT_PROGRAM: GLenum;
395    readonly NEVER: GLenum;
396    readonly LESS: GLenum;
397    readonly EQUAL: GLenum;
398    readonly LEQUAL: GLenum;
399    readonly GREATER: GLenum;
400    readonly NOTEQUAL: GLenum;
401    readonly GEQUAL: GLenum;
402    readonly ALWAYS: GLenum;
403    readonly KEEP: GLenum;
404    readonly REPLACE: GLenum;
405    readonly INCR: GLenum;
406    readonly DECR: GLenum;
407    readonly INVERT: GLenum;
408    readonly INCR_WRAP: GLenum;
409    readonly DECR_WRAP: GLenum;
410    readonly VENDOR: GLenum;
411    readonly RENDERER: GLenum;
412    readonly VERSION: GLenum;
413    readonly NEAREST: GLenum;
414    readonly LINEAR: GLenum;
415    readonly NEAREST_MIPMAP_NEAREST: GLenum;
416    readonly LINEAR_MIPMAP_NEAREST: GLenum;
417    readonly NEAREST_MIPMAP_LINEAR: GLenum;
418    readonly LINEAR_MIPMAP_LINEAR: GLenum;
419    readonly TEXTURE_MAG_FILTER: GLenum;
420    readonly TEXTURE_MIN_FILTER: GLenum;
421    readonly TEXTURE_WRAP_S: GLenum;
422    readonly TEXTURE_WRAP_T: GLenum;
423    readonly TEXTURE_2D: GLenum;
424    readonly TEXTURE: GLenum;
425    readonly TEXTURE_CUBE_MAP: GLenum;
426    readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
427    readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
428    readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
429    readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
430    readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
431    readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
432    readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
433    readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
434    readonly TEXTURE0: GLenum;
435    readonly TEXTURE1: GLenum;
436    readonly TEXTURE2: GLenum;
437    readonly TEXTURE3: GLenum;
438    readonly TEXTURE4: GLenum;
439    readonly TEXTURE5: GLenum;
440    readonly TEXTURE6: GLenum;
441    readonly TEXTURE7: GLenum;
442    readonly TEXTURE8: GLenum;
443    readonly TEXTURE9: GLenum;
444    readonly TEXTURE10: GLenum;
445    readonly TEXTURE11: GLenum;
446    readonly TEXTURE12: GLenum;
447    readonly TEXTURE13: GLenum;
448    readonly TEXTURE14: GLenum;
449    readonly TEXTURE15: GLenum;
450    readonly TEXTURE16: GLenum;
451    readonly TEXTURE17: GLenum;
452    readonly TEXTURE18: GLenum;
453    readonly TEXTURE19: GLenum;
454    readonly TEXTURE20: GLenum;
455    readonly TEXTURE21: GLenum;
456    readonly TEXTURE22: GLenum;
457    readonly TEXTURE23: GLenum;
458    readonly TEXTURE24: GLenum;
459    readonly TEXTURE25: GLenum;
460    readonly TEXTURE26: GLenum;
461    readonly TEXTURE27: GLenum;
462    readonly TEXTURE28: GLenum;
463    readonly TEXTURE29: GLenum;
464    readonly TEXTURE30: GLenum;
465    readonly TEXTURE31: GLenum;
466    readonly ACTIVE_TEXTURE: GLenum;
467    readonly REPEAT: GLenum;
468    readonly CLAMP_TO_EDGE: GLenum;
469    readonly MIRRORED_REPEAT: GLenum;
470    readonly FLOAT_VEC2: GLenum;
471    readonly FLOAT_VEC3: GLenum;
472    readonly FLOAT_VEC4: GLenum;
473    readonly INT_VEC2: GLenum;
474    readonly INT_VEC3: GLenum;
475    readonly INT_VEC4: GLenum;
476    readonly BOOL: GLenum;
477    readonly BOOL_VEC2: GLenum;
478    readonly BOOL_VEC3: GLenum;
479    readonly BOOL_VEC4: GLenum;
480    readonly FLOAT_MAT2: GLenum;
481    readonly FLOAT_MAT3: GLenum;
482    readonly FLOAT_MAT4: GLenum;
483    readonly SAMPLER_2D: GLenum;
484    readonly SAMPLER_CUBE: GLenum;
485    readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
486    readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
487    readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
488    readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
489    readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
490    readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
491    readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
492    readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
493    readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
494    readonly COMPILE_STATUS: GLenum;
495    readonly LOW_FLOAT: GLenum;
496    readonly MEDIUM_FLOAT: GLenum;
497    readonly HIGH_FLOAT: GLenum;
498    readonly LOW_INT: GLenum;
499    readonly MEDIUM_INT: GLenum;
500    readonly HIGH_INT: GLenum;
501    readonly FRAMEBUFFER: GLenum;
502    readonly RENDERBUFFER: GLenum;
503    readonly RGBA4: GLenum;
504    readonly RGB5_A1: GLenum;
505    readonly RGB565: GLenum;
506    readonly DEPTH_COMPONENT16: GLenum;
507    readonly STENCIL_INDEX8: GLenum;
508    readonly DEPTH_STENCIL: GLenum;
509    readonly RENDERBUFFER_WIDTH: GLenum;
510    readonly RENDERBUFFER_HEIGHT: GLenum;
511    readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
512    readonly RENDERBUFFER_RED_SIZE: GLenum;
513    readonly RENDERBUFFER_GREEN_SIZE: GLenum;
514    readonly RENDERBUFFER_BLUE_SIZE: GLenum;
515    readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
516    readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
517    readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
518    readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
519    readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
520    readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
521    readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
522    readonly COLOR_ATTACHMENT0: GLenum;
523    readonly DEPTH_ATTACHMENT: GLenum;
524    readonly STENCIL_ATTACHMENT: GLenum;
525    readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
526    readonly NONE: GLenum;
527    readonly FRAMEBUFFER_COMPLETE: GLenum;
528    readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
529    readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
530    readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
531    readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
532    readonly FRAMEBUFFER_BINDING: GLenum;
533    readonly RENDERBUFFER_BINDING: GLenum;
534    readonly MAX_RENDERBUFFER_SIZE: GLenum;
535    readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
536    readonly UNPACK_FLIP_Y_WEBGL: GLenum;
537    readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
538    readonly CONTEXT_LOST_WEBGL: GLenum;
539    readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
540    readonly BROWSER_DEFAULT_WEBGL: GLenum;
541    readonly canvas: HTMLCanvasElement | OffscreenCanvas;
542    readonly drawingBufferWidth: GLsizei;
543    readonly drawingBufferHeight: GLsizei;
544    getContextAttributes(): WebGLContextAttributes | null;
545    isContextLost(): boolean;
546    getSupportedExtensions(): string[] | null;
547    getExtension(name: string): any;
548    activeTexture(texture: GLenum): void;
549    attachShader(program: WebGLProgram, shader: WebGLShader): void;
550    bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
551    bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
552    bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
553    bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
554    bindTexture(target: GLenum, texture: WebGLTexture | null): void;
555    blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
556    blendEquation(mode: GLenum): void;
557    blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
558    blendFunc(sfactor: GLenum, dfactor: GLenum): void;
559    blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
560    checkFramebufferStatus(target: GLenum): GLenum;
561    clear(mask: GLbitfield): void;
562    clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
563    clearDepth(depth: GLclampf): void;
564    clearStencil(s: GLint): void;
565    colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
566    compileShader(shader: WebGLShader): void;
567    copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
568    copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
569    createBuffer(): WebGLBuffer | null;
570    createFramebuffer(): WebGLFramebuffer | null;
571    createProgram(): WebGLProgram | null;
572    createRenderbuffer(): WebGLRenderbuffer | null;
573    createShader(type: GLenum): WebGLShader | null;
574    createTexture(): WebGLTexture | null;
575    cullFace(mode: GLenum): void;
576    deleteBuffer(buffer: WebGLBuffer | null): void;
577    deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
578    deleteProgram(program: WebGLProgram | null): void;
579    deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
580    deleteShader(shader: WebGLShader | null): void;
581    deleteTexture(texture: WebGLTexture | null): void;
582    depthFunc(func: GLenum): void;
583    depthMask(flag: GLboolean): void;
584    depthRange(zNear: GLclampf, zFar: GLclampf): void;
585    detachShader(program: WebGLProgram, shader: WebGLShader): void;
586    disable(cap: GLenum): void;
587    disableVertexAttribArray(index: GLuint): void;
588    drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
589    drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
590    enable(cap: GLenum): void;
591    enableVertexAttribArray(index: GLuint): void;
592    finish(): void;
593    flush(): void;
594    framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
595    framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
596    frontFace(mode: GLenum): void;
597    generateMipmap(target: GLenum): void;
598    getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
599    getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
600    getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
601    getAttribLocation(program: WebGLProgram, name: string): GLint;
602    getBufferParameter(target: GLenum, pname: GLenum): any;
603    getParameter(pname: GLenum): any;
604    getError(): GLenum;
605    getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
606    getProgramParameter(program: WebGLProgram, pname: GLenum): any;
607    getProgramInfoLog(program: WebGLProgram): string | null;
608    getRenderbufferParameter(target: GLenum, pname: GLenum): any;
609    getShaderParameter(shader: WebGLShader, pname: GLenum): any;
610    getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
611    getShaderInfoLog(shader: WebGLShader): string | null;
612    getShaderSource(shader: WebGLShader): string | null;
613    getTexParameter(target: GLenum, pname: GLenum): any;
614    getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
615    getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
616    getVertexAttrib(index: GLuint, pname: GLenum): any;
617    getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
618    hint(target: GLenum, mode: GLenum): void;
619    isBuffer(buffer: WebGLBuffer | null): GLboolean;
620    isEnabled(cap: GLenum): GLboolean;
621    isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
622    isProgram(program: WebGLProgram | null): GLboolean;
623    isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
624    isShader(shader: WebGLShader | null): GLboolean;
625    isTexture(texture: WebGLTexture | null): GLboolean;
626    lineWidth(width: GLfloat): void;
627    linkProgram(program: WebGLProgram): void;
628    pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
629    polygonOffset(factor: GLfloat, units: GLfloat): void;
630    renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
631    sampleCoverage(value: GLclampf, invert: GLboolean): void;
632    scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
633    shaderSource(shader: WebGLShader, source: string): void;
634    stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
635    stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
636    stencilMask(mask: GLuint): void;
637    stencilMaskSeparate(face: GLenum, mask: GLuint): void;
638    stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
639    stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
640    texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
641    texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
642    uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
643    uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
644    uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
645    uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
646    uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
647    uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
648    uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
649    uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
650    useProgram(program: WebGLProgram | null): void;
651    validateProgram(program: WebGLProgram): void;
652    vertexAttrib1f(index: GLuint, x: GLfloat): void;
653    vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
654    vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
655    vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
656    vertexAttrib1fv(index: GLuint, values: Float32List): void;
657    vertexAttrib2fv(index: GLuint, values: Float32List): void;
658    vertexAttrib3fv(index: GLuint, values: Float32List): void;
659    vertexAttrib4fv(index: GLuint, values: Float32List): void;
660    vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
661    viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
662}
663/**
664 * WebGL 1.0
665 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
666 * @since 7
667 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
668 */
669interface WebGLRenderingContextOverloads {
670    bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
671    bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
672    bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
673    compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
674    compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
675    readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
676    texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
677    texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
678    texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
679    texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
680    uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
681    uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
682    uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
683    uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
684    uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
685    uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
686    uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
687    uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
688    uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
689    uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
690    uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
691}
692/**
693 * WebGL 1.0
694 * @see https://www.khronos.org/registry/webgl/specs/latest/1.0/
695 * @since 7
696 * @syscap SystemCapability.Graphic.Graphic2D.WebGL
697 */
698export interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
699}
700