WebGL2RenderingContext: phương thức deleteSync()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

Note: This feature is available in Web Workers.

Phương thức WebGL2RenderingContext.deleteSync() của WebGL 2 API xóa một đối tượng WebGLSync đã cho.

Cú pháp

js
deleteSync(sync)

Tham số

sync

Một đối tượng WebGLSync để xóa.

Giá trị trả về

None (undefined).

Ví dụ

gl phải là một WebGL2RenderingContext. Đối tượng WebGLSync không có sẵn trong WebGL 1.

js
const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);

// …

gl.deleteSync(sync);

Đặc tả kỹ thuật

Specification
WebGL 2.0 Specification
# 3.7.13

Tương thích trình duyệt

Xem thêm