WebGLRenderingContext.clearDepth()
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.
WebGL API の WebGLRenderingContext.clearDepth()
メソッドは、深度バッファーを消去する値を指定します。
この指定は、clear()
メソッドを呼ぶときに使用される深度の数値です。値は 0 から 1 に丸められます。
構文
void gl.clearDepth(depth);
引数
返り値
ありません。
例
js
gl.clearDepth(0.5);
現在の深度を消去する値を取得するには、DEPTH_CLEAR_VALUE
定数で問い合わせます。
js
gl.getParameter(gl.DEPTH_CLEAR_VALUE);
// 0.5
仕様策定状況
Specification |
---|
WebGL Specification # 5.14.3 |
ブラウザーの対応
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
clearDepth |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.