Skip to content

Commit 075a935

Browse files
committed
feat(types): add a few WebGL extensions
1 parent 530d06a commit 075a935

File tree

6 files changed

+72
-1
lines changed

6 files changed

+72
-1
lines changed

baselines/dom.generated.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10469,6 +10469,14 @@ interface OES_vertex_array_object {
1046910469
readonly VERTEX_ARRAY_BINDING_OES: GLenum;
1047010470
}
1047110471

10472+
interface OVR_multiview2 {
10473+
framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
10474+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum;
10475+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum;
10476+
readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum;
10477+
readonly MAX_VIEWS_OVR: GLenum;
10478+
}
10479+
1047210480
/** The Web Audio API OfflineAudioCompletionEvent interface represents events that occur when the processing of an OfflineAudioContext is terminated. The complete event implements this interface. */
1047310481
interface OfflineAudioCompletionEvent extends Event {
1047410482
readonly renderedBuffer: AudioBuffer;
@@ -14571,6 +14579,17 @@ interface WEBGL_compressed_texture_astc {
1457114579
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
1457214580
}
1457314581

14582+
interface WEBGL_compressed_texture_etc1 {
14583+
readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
14584+
}
14585+
14586+
interface WEBGL_compressed_texture_pvrtc {
14587+
readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum;
14588+
readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum;
14589+
readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum;
14590+
readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum;
14591+
}
14592+
1457414593
/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
1457514594
interface WEBGL_compressed_texture_s3tc {
1457614595
readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
@@ -16056,8 +16075,11 @@ interface WebGLRenderingContextBase {
1605616075
getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
1605716076
getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
1605816077
getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
16078+
getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
1605916079
getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
1606016080
getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
16081+
getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
16082+
getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null;
1606116083
getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
1606216084
getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
1606316085
getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;

baselines/webworker.generated.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,14 @@ interface OES_vertex_array_object {
23352335
readonly VERTEX_ARRAY_BINDING_OES: GLenum;
23362336
}
23372337

2338+
interface OVR_multiview2 {
2339+
framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
2340+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum;
2341+
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum;
2342+
readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum;
2343+
readonly MAX_VIEWS_OVR: GLenum;
2344+
}
2345+
23382346
/** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */
23392347
interface Path2D extends CanvasPath {
23402348
/**
@@ -3109,6 +3117,17 @@ interface WEBGL_compressed_texture_astc {
31093117
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
31103118
}
31113119

3120+
interface WEBGL_compressed_texture_etc1 {
3121+
readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
3122+
}
3123+
3124+
interface WEBGL_compressed_texture_pvrtc {
3125+
readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum;
3126+
readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum;
3127+
readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum;
3128+
readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum;
3129+
}
3130+
31123131
/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
31133132
interface WEBGL_compressed_texture_s3tc {
31143133
readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
@@ -4583,8 +4602,11 @@ interface WebGLRenderingContextBase {
45834602
getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
45844603
getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
45854604
getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
4605+
getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
45864606
getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
45874607
getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
4608+
getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
4609+
getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null;
45884610
getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
45894611
getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
45904612
getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;

inputfiles/addedTypes.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,12 +1478,21 @@
14781478
"OES_vertex_array_object": {
14791479
"override-exposed": "Window Worker"
14801480
},
1481+
"OVR_multiview2": {
1482+
"override-exposed": "Window Worker"
1483+
},
14811484
"WEBGL_color_buffer_float": {
14821485
"override-exposed": "Window Worker"
14831486
},
14841487
"WEBGL_compressed_texture_astc": {
14851488
"override-exposed": "Window Worker"
14861489
},
1490+
"WEBGL_compressed_texture_etc1": {
1491+
"override-exposed": "Window Worker"
1492+
},
1493+
"WEBGL_compressed_texture_pvrtc": {
1494+
"override-exposed": "Window Worker"
1495+
},
14871496
"WEBGL_compressed_texture_s3tc_srgb": {
14881497
"override-exposed": "Window Worker"
14891498
},

inputfiles/idlSources.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,11 @@
575575
"title": "WebGL OES_vertex_array_object",
576576
"shortName": "OES_vertex_array_object"
577577
},
578+
{
579+
"url": "https://www.khronos.org/registry/webgl/extensions/OVR_multiview2/",
580+
"title": "WebGL OVR_multiview2",
581+
"shortName": "OVR_multiview"
582+
},
578583
{
579584
"url": "https://www.khronos.org/registry/webgl/extensions/WEBGL_color_buffer_float/",
580585
"title": "WebGL WEBGL_color_buffer_float",
@@ -585,6 +590,16 @@
585590
"title": "WebGL WEBGL_compressed_texture_astc",
586591
"shortName": "WEBGL_compressed_texture_astc"
587592
},
593+
{
594+
"url": "https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc1/",
595+
"title": "WebGL WEBGL_compressed_texture_etc1",
596+
"shortName": "WEBGL_compressed_texture_etc"
597+
},
598+
{
599+
"url": "https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/",
600+
"title": "WebGL WEBGL_compressed_texture_pvrtc",
601+
"shortName": "WEBGL_compressed_texture_pvrtc"
602+
},
588603
{
589604
"url": "https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/",
590605
"title": "WebGL WEBGL_compressed_texture_s3tc",

inputfiles/overridingTypes.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,11 @@
161161
"getExtension(extensionName: \"EXT_shader_texture_lod\"): EXT_shader_texture_lod | null",
162162
"getExtension(extensionName: \"EXT_sRGB\"): EXT_sRGB | null",
163163
"getExtension(extensionName: \"OES_vertex_array_object\"): OES_vertex_array_object | null",
164+
"getExtension(extensionName: \"OVR_multiview2\"): OVR_multiview2 | null",
164165
"getExtension(extensionName: \"WEBGL_color_buffer_float\"): WEBGL_color_buffer_float | null",
165166
"getExtension(extensionName: \"WEBGL_compressed_texture_astc\"): WEBGL_compressed_texture_astc | null",
167+
"getExtension(extensionName: \"WEBGL_compressed_texture_etc1\"): WEBGL_compressed_texture_etc1 | null",
168+
"getExtension(extensionName: \"WEBGL_compressed_texture_pvrtc\"): WEBGL_compressed_texture_pvrtc | null",
166169
"getExtension(extensionName: \"WEBGL_compressed_texture_s3tc_srgb\"): WEBGL_compressed_texture_s3tc_srgb | null",
167170
"getExtension(extensionName: \"WEBGL_debug_shaders\"): WEBGL_debug_shaders | null",
168171
"getExtension(extensionName: \"WEBGL_draw_buffers\"): WEBGL_draw_buffers | null",

src/widlprocess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function convertInterfaceCommon(i: webidl2.InterfaceType | webidl2.InterfaceMixi
121121
"named-constructor": getLegacyFactoryFunction(i.extAttrs, i.name),
122122
exposed: getExtAttrConcatenated(i.extAttrs, "Exposed"),
123123
global: getExtAttrConcatenated(i.extAttrs, "Global"),
124-
"no-interface-object": hasExtAttr(i.extAttrs, "LegacyNoInterfaceObject") ? 1 : undefined,
124+
"no-interface-object": (hasExtAttr(i.extAttrs, "LegacyNoInterfaceObject") || hasExtAttr(i.extAttrs, "NoInterfaceObject")) ? 1 : undefined,
125125
"legacy-window-alias": getExtAttr(i.extAttrs, "LegacyWindowAlias"),
126126
"legacy-namespace": getExtAttr(i.extAttrs, "LegacyNamespace")[0]
127127
};

0 commit comments

Comments
 (0)