aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/webglrenderingcontext/cleardepth/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/webglrenderingcontext/cleardepth/index.html')
-rw-r--r--files/ja/web/api/webglrenderingcontext/cleardepth/index.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/files/ja/web/api/webglrenderingcontext/cleardepth/index.html b/files/ja/web/api/webglrenderingcontext/cleardepth/index.html
new file mode 100644
index 0000000000..038675c9b2
--- /dev/null
+++ b/files/ja/web/api/webglrenderingcontext/cleardepth/index.html
@@ -0,0 +1,72 @@
+---
+title: WebGLRenderingContext.clearDepth()
+slug: Web/API/WebGLRenderingContext/clearDepth
+translation_of: Web/API/WebGLRenderingContext/clearDepth
+---
+<div>{{APIRef("WebGL")}}</div>
+
+<p><a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> の <strong><code>WebGLRenderingContext.clearDepth()</code></strong> メソッドは、深度バッファーを消去する値を指定します。</p>
+
+<p>この指定は、{{domxref("WebGLRenderingContext.clear", "clear()")}} メソッドを呼ぶときに使用される深度の数値です。値は 0 から 1 に丸められます。</p>
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox">void <var>gl</var>.clearDepth(<var>depth</var>);
+</pre>
+
+<h3 id="引数">引数</h3>
+
+<dl>
+ <dt><code>depth</code></dt>
+ <dd>深度の値を指定する {{domxref("GLclampf")}} で、深度バッファーを消去するときに使われる値です。既定値は 1 です。</dd>
+</dl>
+
+<h3 id="返り値">返り値</h3>
+
+<p>ありません。</p>
+
+<h2 id="例">例</h2>
+
+<pre class="brush: js">gl.clearDepth(0.5);
+</pre>
+
+<p>現在の深度を消去する値を取得するには、<code>DEPTH_CLEAR_VALUE</code> 定数で問い合わせます。</p>
+
+<pre class="brush: js">gl.getParameter(gl.DEPTH_CLEAR_VALUE);
+// 0.5</pre>
+
+<h2 id="仕様策定状況">仕様策定状況</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">策定状況</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('WebGL', "#5.14.3", "clearDepth")}}</td>
+ <td>{{Spec2('WebGL')}}</td>
+ <td>初回定義。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('OpenGL ES 2.0', "glClearDepthf.xml", "glClearDepthf")}}</td>
+ <td>{{Spec2('OpenGL ES 2.0')}}</td>
+ <td>OpenGL API のマニュアルページ。</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザーの対応">ブラウザーの対応</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("api.WebGLRenderingContext.clearDepth")}}</p>
+
+<h2 id="関連項目">関連項目</h2>
+
+<ul>
+ <li>{{domxref("WebGLRenderingContext.clear()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.clearColor()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.clearStencil()")}}</li>
+</ul>