OES_vertex_array_object: phương thức createVertexArrayOES()

Baseline Widely available

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

Phương thức OES_vertex_array_object.createVertexArrayOES() của WebGL API tạo và khởi tạo đối tượng WebGLVertexArrayObject đại diện cho một đối tượng mảng đỉnh (VAO) trỏ đến dữ liệu mảng đỉnh và cung cấp tên cho các bộ dữ liệu đỉnh khác nhau.

Cú pháp

js
createVertexArrayOES()

Tham số

Không có.

Giá trị trả về

Một WebGLVertexArrayObject đại diện cho đối tượng mảng đỉnh (VAO) trỏ đến dữ liệu mảng đỉnh.

Ví dụ

js
const ext = gl.getExtension("OES_vertex_array_object");
const vao = ext.createVertexArrayOES();
ext.bindVertexArrayOES(vao);

// …
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// …

Thông số kỹ thuật

Thông số kỹ thuật
WebGL OES_vertex_array_object Khronos Ratified Extension Specification

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

Xem thêm