WebGLRenderingContext: deleteProgram() method
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Note: This feature is available in Web Workers.
Phương thức WebGLRenderingContext.deleteProgram() của WebGL API xóa một đối tượng WebGLProgram đã cho. Phương pháp này không có hiệu lực nếu chương trình đã bị xóa.
Cú pháp
js
deleteProgram(program)
Thông số
program-
Một đối tượng
WebGLProgramcần xóa.
Giá trị trả về
Không có (undefined).
Ví dụ
>Xóa một chương trình
js
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const program = gl.createProgram();
// …
gl.deleteProgram(program);
Thông số kỹ thuật
| Specification |
|---|
| WebGL Specification> # 5.14.9> |