You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Get WebXR fully working in Godot 4!
This commit is contained in:
@@ -37,14 +37,15 @@ const GodotWebGL2 = {
|
||||
godot_webgl2_glFramebufferTextureMultiviewOVR: function (target, attachment, texture, level, base_view_index, num_views) {
|
||||
const context = GL.currentContext;
|
||||
if (typeof context.multiviewExt === 'undefined') {
|
||||
const ext = context.GLctx.getExtension('OVR_multiview2');
|
||||
const /** OVR_multiview2 */ ext = context.GLctx.getExtension('OVR_multiview2');
|
||||
if (!ext) {
|
||||
console.error('Trying to call glFramebufferTextureMultiviewOVR() without the OVR_multiview2 extension');
|
||||
return;
|
||||
}
|
||||
context.multiviewExt = ext;
|
||||
}
|
||||
context.multiviewExt.framebufferTextureMultiviewOVR(target, attachment, GL.textures[texture], level, base_view_index, num_views);
|
||||
const /** OVR_multiview2 */ ext = context.multiviewExt;
|
||||
ext.framebufferTextureMultiviewOVR(target, attachment, GL.textures[texture], level, base_view_index, num_views);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user