diff options
Diffstat (limited to 'platform/web/js/libs/library_godot_webgl2.js')
-rw-r--r-- | platform/web/js/libs/library_godot_webgl2.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/web/js/libs/library_godot_webgl2.js b/platform/web/js/libs/library_godot_webgl2.js index dbaec9f01b..005b4b7917 100644 --- a/platform/web/js/libs/library_godot_webgl2.js +++ b/platform/web/js/libs/library_godot_webgl2.js @@ -61,6 +61,23 @@ const GodotWebGL2 = { const /** OVR_multiview2 */ ext = context.multiviewExt; ext.framebufferTextureMultiviewOVR(target, attachment, GL.textures[texture], level, base_view_index, num_views); }, + + godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR__deps: ['emscripten_webgl_get_current_context'], + godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR__proxy: 'sync', + godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR__sig: 'viiiiiii', + godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR: function (target, attachment, texture, level, samples, base_view_index, num_views) { + const context = GL.currentContext; + if (typeof context.oculusMultiviewExt === 'undefined') { + const /** OCULUS_multiview */ ext = context.GLctx.getExtension('OCULUS_multiview'); + if (!ext) { + GodotRuntime.error('Trying to call glFramebufferTextureMultisampleMultiviewOVR() without the OCULUS_multiview extension'); + return; + } + context.oculusMultiviewExt = ext; + } + const /** OCULUS_multiview */ ext = context.oculusMultiviewExt; + ext.framebufferTextureMultisampleMultiviewOVR(target, attachment, GL.textures[texture], level, samples, base_view_index, num_views); + }, }; autoAddDeps(GodotWebGL2, '$GodotWebGL2'); |