1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add MSAA support for WebXR

This commit is contained in:
David Snopek
2023-11-08 14:54:29 -06:00
parent a311a4b162
commit 275c496bc8
9 changed files with 123 additions and 50 deletions

View File

@@ -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');