aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/webglrenderingcontext/shadersource
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/webglrenderingcontext/shadersource
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/webglrenderingcontext/shadersource')
-rw-r--r--files/ja/web/api/webglrenderingcontext/shadersource/index.html70
1 files changed, 70 insertions, 0 deletions
diff --git a/files/ja/web/api/webglrenderingcontext/shadersource/index.html b/files/ja/web/api/webglrenderingcontext/shadersource/index.html
new file mode 100644
index 0000000000..47018f4f9d
--- /dev/null
+++ b/files/ja/web/api/webglrenderingcontext/shadersource/index.html
@@ -0,0 +1,70 @@
+---
+title: WebGLRenderingContext.shaderSource()
+slug: Web/API/WebGLRenderingContext/shaderSource
+translation_of: Web/API/WebGLRenderingContext/shaderSource
+---
+<div>{{APIRef("WebGL")}}</div>
+
+<p><a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> の <strong><code>WebGLRenderingContext.shaderSource()</code></strong> メソッドは、{{domxref("WebGLShader")}} のソースコードを設定します。</p>
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox">void <var>gl</var>.shaderSource(<var>shader</var>, <var>source</var>);
+</pre>
+
+<h3 id="引数">引数</h3>
+
+<dl>
+ <dt>shader</dt>
+ <dd>ソースコードを設定する {{domxref("WebGLShader")}} オブジェクト。</dd>
+ <dt>source</dt>
+ <dd>設定する GLSL ソースコードを含む {{domxref("DOMString")}}。</dd>
+</dl>
+
+<h3 id="返り値">返り値</h3>
+
+<p>ありません。</p>
+
+<h2 id="例">例</h2>
+
+<pre class="brush: js">var shader = gl.createShader(gl.VERTEX_SHADER);
+gl.shaderSource(shader, originalSource);
+
+var source = gl.getShaderSource(shader);</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", "shaderSource")}}</td>
+ <td>{{Spec2('WebGL')}}</td>
+ <td>初回定義。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('OpenGL ES 2.0', "glShaderSource.xml", "glShaderSource")}}</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.shaderSource")}}</p>
+
+<h2 id="関連項目">関連項目</h2>
+
+<ul>
+ <li>{{domxref("WebGLRenderingContext.createShader()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.isShader()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.deleteShader()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.getShaderSource()")}}</li>
+</ul>