WebGL2RenderingContext.createSampler()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.
WebGL 2 API 定义的 WebGL2RenderingContext.createSampler()
方法用于创建并初始化 WebGLSampler
对象。
句法
WebGLSampler gl.createSampler();
参数
无。
返回值
WebGLSampler
对象。
例子
gl
必须是 WebGL2RenderingContext
类型。WebGL 1 不支持 WebGLSampler
对象。
js
var sampler = gl.createSampler();
规范
Specification |
---|
WebGL 2.0 Specification # 3.7.13 |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
createSampler |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.