OES_element_index_uint extension

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Phần mở rộng OES_element_index_uint là một phần của WebGL API và thêm hỗ trợ cho các kiểu gl.UNSIGNED_INT vào WebGLRenderingContext.drawElements().

Các phần mở rộng WebGL có sẵn bằng cách sử dụng phương thức WebGLRenderingContext.getExtension(). Để biết thêm thông tin, xem Sử dụng Phần mở rộng trong hướng dẫn WebGL.

Note: Phần mở rộng này chỉ có sẵn cho ngữ cảnh WebGL1. Trong WebGL2, chức năng của phần mở rộng này có sẵn theo mặc định.

Phương thức mở rộng

Phần mở rộng này mở rộng WebGLRenderingContext.drawElements():

  • Tham số type giờ chấp nhận gl.UNSIGNED_INT.

Ví dụ

js
const ext = gl.getExtension("OES_element_index_uint");

gl.drawElements(gl.POINTS, 8, gl.UNSIGNED_INT, 0);

Thông số kỹ thuật

Specification
WebGL OES_element_index_uint Khronos Ratified Extension Specification

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

Xem thêm