Add initial support for WebGL 2 BlitFramebuffer (#26389)

Add initial support for the WebGL2 BlitFramebuffer call.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Istvan <istvan.miklos@h-lab.eu>
This commit is contained in:
Josh Matthews 2025-01-06 13:37:35 -05:00 committed by GitHub
parent 2575a0daf1
commit c43762faea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1686 additions and 31 deletions

View file

@ -1388,6 +1388,22 @@ impl WebGLImpl {
WebGLCommand::BindTexture(target, id) => unsafe {
gl.bind_texture(target, id.map(WebGLTextureId::glow))
},
WebGLCommand::BlitFrameBuffer(
src_x0,
src_y0,
src_x1,
src_y1,
dst_x0,
dst_y0,
dst_x1,
dst_y1,
mask,
filter,
) => unsafe {
gl.blit_framebuffer(
src_x0, src_y0, src_x1, src_y1, dst_x0, dst_y0, dst_x1, dst_y1, mask, filter,
);
},
WebGLCommand::Uniform1f(uniform_id, v) => unsafe {
gl.uniform_1_f32(native_uniform_location(uniform_id).as_ref(), v)
},