Back to Content

WebGL2RenderingContext: isVertexArray() method

files/en-us/web/api/webgl2renderingcontext/isvertexarray/index.md

latest830 B
Original Source

{{APIRef("WebGL")}}{{AvailableInWorkers}}

The WebGL2RenderingContext.isVertexArray() method of the WebGL API returns true if the passed object is a valid {{domxref("WebGLVertexArrayObject")}} object.

Syntax

js-nolint
isVertexArray(vertexArray)

Parameters

  • vertexArray
    • : A {{domxref("WebGLVertexArrayObject")}} (VAO) object to test.

Return value

A {{domxref("WebGL_API/Types", "GLboolean")}} indicating whether the given object is a valid {{domxref("WebGLVertexArrayObject")}} object (true) or not (false).

Examples

js
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// …

gl.isVertexArray(vao);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("WebGLVertexArrayObject")}}