这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

WebGLSampler interface is part of the WebGL 2 API and stores sampling parameters for WebGLTexture access inside of a shader.

When working with WebGLSampler objects, the following methods of the WebGL2RenderingContext are useful:

范例

创建 WebGLSampler 对象

in this example, gl 必须为 WebGL2RenderingContext . WebGLSampler objects are not available in WebGL 1.

var sampler = gl.createSampler();
					

规范

规范 状态 注释
WebGL 2.0
The definition of 'WebGLSample' in that specification.
编者草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
WebGLSampler Chrome 56 Edge 79 Firefox 51 IE No Opera 43 Safari No WebView Android 58 Chrome Android 58 Firefox Android 51 Opera Android 43 Safari iOS No Samsung Internet Android 7.0

图例

完整支持

完整支持

不支持

不支持

元数据

  • 最后修改: