aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/webgltexture
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/zh-cn/web/api/webgltexture
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/webgltexture')
-rw-r--r--files/zh-cn/web/api/webgltexture/index.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/webgltexture/index.html b/files/zh-cn/web/api/webgltexture/index.html
new file mode 100644
index 0000000000..5187d4a762
--- /dev/null
+++ b/files/zh-cn/web/api/webgltexture/index.html
@@ -0,0 +1,72 @@
+---
+title: WebGLTexture
+slug: Web/API/WebGLTexture
+tags:
+ - API
+ - Reference
+ - WebGL
+translation_of: Web/API/WebGLTexture
+---
+<div><strong>WebGLTexture</strong>接口是<a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a>的一部分,为不透明的纹理对象提供储存和状态等纹理操作。</div>
+
+<h2 id="描述">描述</h2>
+
+<p><code>WebGLTexture</code>对象自身未定义任何属性或方法, 其内容无法被直接访问。当使用<code>WebGLTexture</code>对象时, {{domxref("WebGLRenderingContext")}} 里的这些方法会很有用:</p>
+
+<ul>
+ <li>{{domxref("WebGLRenderingContext.bindTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.createTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.deleteTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.isTexture()")}}</li>
+</ul>
+
+<h2 id="例子">例子</h2>
+
+<h3 id="创建一个纹理">创建一个纹理</h3>
+
+<pre class="brush: js">var canvas = document.getElementById('canvas');
+var gl = canvas.getContext('webgl');
+var texture = gl.createTexture();
+</pre>
+
+<h2 id="说明">说明</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('WebGL', "#5.9", "WebGLTexture")}}</td>
+ <td>{{Spec2('WebGL')}}</td>
+ <td>Initial definition.</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.WebGLTexture")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{domxref("WebGLRenderingContext.bindTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.createTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.deleteTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.isTexture()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.compressedTexImage2D()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.compressedTexSubImage2D()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.copyTexImage2D()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.copyTexSubImage2D()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.generateMipmap()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.getTexParameter()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.texImage2D()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.texSubImage2D()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.texParameterf()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.texParameteri()")}}</li>
+</ul>