1 |
|
2 |
|
3 |
|
4 | interface HTMLCanvasElement {
|
5 | getContext(
|
6 | contextId: "webgl" | "experimental-webgl",
|
7 | contextAttributes?: WebGLContextAttributes,
|
8 | ): (WebGLRenderingContext & WebGL1Extensions) | null;
|
9 | }
|
10 |
|
11 | interface WebGL1Extensions {
|
12 | getExtension(name: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float;
|
13 |
|
14 | getExtension(name: "WEBGL_compressed_texture_atc"): WEBGL_compressed_texture_atc;
|
15 | getExtension(name: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1;
|
16 | getExtension(name: "WEBGL_compressed_texture_pvrtc"): WEBKIT_WEBGL_compressed_texture_pvrtc;
|
17 |
|
18 |
|
19 | getExtension(name: "WEBKIT_EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic;
|
20 | getExtension(name: "WEBKIT_WEBGL_compressed_texture_atc"): WEBGL_compressed_texture_atc;
|
21 | getExtension(name: "WEBKIT_WEBGL_compressed_texture_pvrtc"): WEBKIT_WEBGL_compressed_texture_pvrtc;
|
22 | getExtension(name: "WEBKIT_WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc;
|
23 | getExtension(name: "WEBKIT_WEBGL_depth_texture"): WEBGL_depth_texture;
|
24 | getExtension(name: "WEBKIT_WEBGL_lose_context"): WEBGL_lose_context;
|
25 | }
|
26 |
|
27 |
|
28 | interface WebGLObject {
|
29 | readonly __WebGLObject: void;
|
30 | }
|
31 | interface WebGLBuffer {
|
32 | readonly __WebGLBuffer: void;
|
33 | }
|
34 | interface WebGLFramebuffer {
|
35 | readonly __WebGLFramebuffer: void;
|
36 | }
|
37 | interface WebGLProgram {
|
38 | readonly __WebGLProgram: void;
|
39 | }
|
40 | interface WebGLRenderbuffer {
|
41 | readonly __WebGLRenderbuffer: void;
|
42 | }
|
43 | interface WebGLShader {
|
44 | readonly __WebGLShader: void;
|
45 | }
|
46 | interface WebGLTexture {
|
47 | readonly __WebGLTexture: void;
|
48 | }
|
49 | interface WebGLUniformLocation {
|
50 | readonly __WebGLUniformLocation: void;
|
51 | }
|
52 | interface WebGLVertexArrayObjectOES extends WebGLObject {
|
53 | readonly __WebGLVertexArrayObjectOES: void;
|
54 | }
|
55 |
|
56 | interface EXT_frag_depth {
|
57 | readonly __EXT_frag_depth: void;
|
58 | }
|
59 | interface EXT_shader_texture_lod {
|
60 | readonly __EXT_shader_texture_lod: void;
|
61 | }
|
62 |
|
63 | interface OES_element_index_uint {
|
64 | readonly __OESElementIndexUint: void;
|
65 | }
|
66 | interface OES_texture_float {
|
67 | readonly __OES_texture_float: void;
|
68 | }
|
69 | interface OES_texture_float_linear {
|
70 | readonly __OES_texture_float_linear: void;
|
71 | }
|
72 | interface OES_texture_half_float_linear {
|
73 | readonly __OES_texture_half_float_linear: void;
|
74 | }
|
75 |
|
76 | interface OES_vertex_array_object {
|
77 |
|
78 | createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
|
79 | deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
|
80 | isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): boolean;
|
81 | bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
|
82 | }
|
83 |
|
84 | interface WEBGL_compressed_texture_atc {
|
85 | readonly COMPRESSED_RGB_ATC_WEBGL: number;
|
86 | readonly COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: number;
|
87 | readonly COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: number;
|
88 | }
|
89 |
|
90 | interface WEBKIT_WEBGL_compressed_texture_pvrtc {
|
91 | readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: number;
|
92 | readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: number;
|
93 | readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: number;
|
94 | readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: number;
|
95 | }
|