WebGL2RenderingContext: phương thức 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.
Note: This feature is available in Web Workers.
Phương thức WebGL2RenderingContext.createSampler() của WebGL 2 API tạo và khởi tạo các đối tượng WebGLSampler.
Cú pháp
js
createSampler()
Tham số
Không có.
Giá trị trả về
Một đối tượng WebGLSampler.
Ví dụ
gl phải là một WebGL2RenderingContext.
Đối tượng WebGLSampler không có sẵn trong WebGL 1.
js
const sampler = gl.createSampler();
Đặc tả kỹ thuật
| Specification |
|---|
| WebGL 2.0 Specification> # 3.7.13> |