WebGLTexture
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.
* Some parts of this feature may have varying levels of support.
WebGLTexture接口是WebGL API的一部分,为不透明的纹理对象提供储存和状态等纹理操作。
描述
WebGLTexture
对象自身未定义任何属性或方法,其内容无法被直接访问。当使用WebGLTexture
对象时, WebGLRenderingContext
里的这些方法会很有用:
例子
创建一个纹理
js
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
var texture = gl.createTexture();
规范
Specification |
---|
WebGL Specification # 5.9 |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
WebGLTexture | ||||||||||||
Available in workers |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
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.
See also
WebGLRenderingContext.bindTexture()
WebGLRenderingContext.createTexture()
WebGLRenderingContext.deleteTexture()
WebGLRenderingContext.isTexture()
WebGLRenderingContext.compressedTexImage2D()
WebGLRenderingContext.compressedTexSubImage2D()
WebGLRenderingContext.copyTexImage2D()
WebGLRenderingContext.copyTexSubImage2D()
WebGLRenderingContext.generateMipmap()
WebGLRenderingContext.getTexParameter()
WebGLRenderingContext.texImage2D()
WebGLRenderingContext.texSubImage2D()
WebGLRenderingContext.texParameterf()
WebGLRenderingContext.texParameteri()