| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
const GodotWebGL2 = { |
| 32 |
$GodotWebGL2__deps: ['$GL', '$GodotRuntime'], |
| 33 |
$GodotWebGL2: {}, |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
godot_webgl2_glGetBufferSubData__proxy: 'sync', |
| 38 |
godot_webgl2_glGetBufferSubData__sig: 'vippp', |
| 39 |
godot_webgl2_glGetBufferSubData__deps: ['$GL', 'emscripten_webgl_get_current_context'], |
| 40 |
godot_webgl2_glGetBufferSubData: function (target, offset, size, data) { |
| 41 |
const gl_context_handle = _emscripten_webgl_get_current_context(); |
| 42 |
const gl = GL.getContext(gl_context_handle); |
| 43 |
if (gl) { |
| 44 |
gl.GLctx['getBufferSubData'](target, offset, HEAPU8, data, size); |
| 45 |
} |
| 46 |
}, |
| 47 |
|
| 48 |
godot_webgl2_glFramebufferTextureMultiviewOVR__deps: ['emscripten_webgl_get_current_context'], |
| 49 |
godot_webgl2_glFramebufferTextureMultiviewOVR__proxy: 'sync', |
| 50 |
godot_webgl2_glFramebufferTextureMultiviewOVR__sig: 'viiiiii', |
| 51 |
godot_webgl2_glFramebufferTextureMultiviewOVR: function (target, attachment, texture, level, base_view_index, num_views) { |
| 52 |
const context = GL.currentContext; |
| 53 |
if (typeof context.multiviewExt === 'undefined') { |
| 54 |
const ext = context.GLctx.getExtension('OVR_multiview2'); |
| 55 |
if (!ext) { |
| 56 |
GodotRuntime.error('Trying to call glFramebufferTextureMultiviewOVR() without the OVR_multiview2 extension'); |
| 57 |
return; |
| 58 |
} |
| 59 |
context.multiviewExt = ext; |
| 60 |
} |
| 61 |
const ext = context.multiviewExt; |
| 62 |
ext.framebufferTextureMultiviewOVR(target, attachment, GL.textures[texture], level, base_view_index, num_views); |
| 63 |
}, |
| 64 |
|
| 65 |
godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR__deps: ['emscripten_webgl_get_current_context'], |
| 66 |
godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR__proxy: 'sync', |
| 67 |
godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR__sig: 'viiiiiii', |
| 68 |
godot_webgl2_glFramebufferTextureMultisampleMultiviewOVR: function (target, attachment, texture, level, samples, base_view_index, num_views) { |
| 69 |
const context = GL.currentContext; |
| 70 |
if (typeof context.oculusMultiviewExt === 'undefined') { |
| 71 |
const ext = context.GLctx.getExtension('OCULUS_multiview'); |
| 72 |
if (!ext) { |
| 73 |
GodotRuntime.error('Trying to call glFramebufferTextureMultisampleMultiviewOVR() without the OCULUS_multiview extension'); |
| 74 |
return; |
| 75 |
} |
| 76 |
context.oculusMultiviewExt = ext; |
| 77 |
} |
| 78 |
const ext = context.oculusMultiviewExt; |
| 79 |
ext.framebufferTextureMultisampleMultiviewOVR(target, attachment, GL.textures[texture], level, samples, base_view_index, num_views); |
| 80 |
}, |
| 81 |
}; |
| 82 |
|
| 83 |
autoAddDeps(GodotWebGL2, '$GodotWebGL2'); |
| 84 |
mergeInto(LibraryManager.library, GodotWebGL2); |