WebGL2RenderingContext: phương thức vertexAttribDivisor()
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.vertexAttribDivisor() của WebGL 2 API sửa đổi tốc độ mà các thuộc tính đỉnh chung tiến lên khi kết xuất nhiều phiên bản của hình nguyên với gl.drawArraysInstanced() và gl.drawElementsInstanced().
Note:
Khi sử dụng WebGL 1, phần mở rộng ANGLE_instanced_arrays cũng có thể cung cấp phương thức này.
Cú pháp
js
vertexAttribDivisor(index, divisor)
Tham số
Giá trị trả về
None (undefined).
Ví dụ
js
gl.vertexAttribDivisor(0, 2);
Đặc tả kỹ thuật
| Specification |
|---|
| WebGL 2.0 Specification> # 3.7.9> |