WebGL2RenderingContext: phương thức vertexAttribI4[u]i[v]()

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.

Các phương thức WebGL2RenderingContext.vertexAttribI4[u]i[v]() của WebGL 2 API chỉ định giá trị số nguyên cho các thuộc tính đỉnh chung.

Cú pháp

js
vertexAttribI4i(index, v0, v1, v2, v3)
vertexAttribI4ui(index, v0, v1, v2, v3)
vertexAttribI4iv(index, value)
vertexAttribI4uiv(index, value)

Tham số

index

Một GLuint chỉ định vị trí của thuộc tính đỉnh sẽ được sửa đổi.

v0, v1, v2, v3

Một Number số nguyên cho giá trị thuộc tính đỉnh.

value

Một Uint32Array/Int32Array hoặc chuỗi các GLuint/GLint cho các giá trị thuộc tính đỉnh vector số nguyên.

Giá trị trả về

None (undefined).

Ví dụ

js
gl.vertexAttribI4i(index, 10);

Đặc tả kỹ thuật

Thông số kỹ thuật
WebGL 2.0 Specification
# 3.7.8

Tương thích trình duyệt

Xem thêm