WebGLTexture

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

浏览器兼容性

BCD tables only load in the browser

See also