diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/webglrenderingcontext/useprogram | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/api/webglrenderingcontext/useprogram')
-rw-r--r-- | files/ja/web/api/webglrenderingcontext/useprogram/index.html | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/files/ja/web/api/webglrenderingcontext/useprogram/index.html b/files/ja/web/api/webglrenderingcontext/useprogram/index.html new file mode 100644 index 0000000000..3d55e0ae6c --- /dev/null +++ b/files/ja/web/api/webglrenderingcontext/useprogram/index.html @@ -0,0 +1,76 @@ +--- +title: WebGLRenderingContext.useProgram() +slug: Web/API/WebGLRenderingContext/useProgram +translation_of: Web/API/WebGLRenderingContext/useProgram +--- +<div>{{APIRef("WebGL")}}</div> + +<p><a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> の <strong><code>WebGLRenderingContext.useProgram()</code></strong> メソッドは、指定した {{domxref("WebGLProgram")}} を現在の描画ステートの一部として設定します。</p> + +<h2 id="構文">構文</h2> + +<pre class="syntaxbox">void <var>gl</var>.useProgram(<var>program</var>); +</pre> + +<h3 id="引数">引数</h3> + +<dl> + <dt>program</dt> + <dd>使用する {{domxref("WebGLProgram")}}。</dd> +</dl> + +<h3 id="返り値">返り値</h3> + +<p>ありません。</p> + +<h2 id="例">例</h2> + +<pre class="brush: js">var program = gl.createProgram(); + +// Attach pre-existing shaders +gl.attachShader(program, vertexShader); +gl.attachShader(program, fragmentShader); + +gl.linkProgram(program); +gl.useProgram(program); +</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.9", "useProgram")}}</td> + <td>{{Spec2('WebGL')}}</td> + <td>初回定義。</td> + </tr> + <tr> + <td>{{SpecName('OpenGL ES 2.0', "glUseProgram.xml", "glUseProgram")}}</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.useProgram")}}</p> + +<h2 id="関連項目">関連項目</h2> + +<ul> + <li>{{domxref("WebGLRenderingContext.createProgram()")}}</li> + <li>{{domxref("WebGLRenderingContext.deleteProgram()")}}</li> + <li>{{domxref("WebGLRenderingContext.isProgram()")}}</li> + <li>{{domxref("WebGLRenderingContext.linkProgram()")}}</li> + <li>{{domxref("WebGLRenderingContext.validateProgram()")}}</li> + <li>{{domxref("WebGLRenderingContext.getProgramParameter()")}}</li> + <li>{{domxref("WebGLRenderingContext.getProgramInfoLog()")}}</li> +</ul> |