WebGLRenderingContext: depthMask() 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.depthMask() của WebGL API thiết lập việc ghi vào vùng đệm sâu được bật hay tắt.
Cú pháp
js
depthMask(flag)
Thông số
Giá trị trả về
Không có (undefined).
Ví dụ
js
gl.depthMask(false);
Để có được mặt nạ độ sâu hiện tại, hãy truy vấn hằng số DEPTH_WRITEMASK trả về giá trị boolean.
js
gl.getParameter(gl.DEPTH_WRITEMASK);
// false
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebGL Specification> # 5.14.3> |