Light | Dark

# docs.GL

OpenGL 4
OpenGL 3
OpenGL ES 3

# glBindVertexArray

## Name

glBindVertexArray — bind a vertex array object

## C Specification

`void glBindVertexArray(` | GLuint array`)`;

## Parameters

`array`

  Specifies the name of the vertex array to bind.

## Description

`glBindVertexArray` binds the vertex array object with name `array`. `array` is the name of a vertex array object previously returned from a call to glGenVertexArrays, or zero to break the existing vertex array object binding.

If no vertex array object with name `array` exists, one is created when `array` is first bound. If the bind is successful no change is made to the state of the vertex array object, and any previous vertex array object binding is broken.

## Errors

`GL_INVALID_OPERATION` is generated if `array` is not zero or the name of a vertex array object previously returned from a call to glGenVertexArrays.

## Tutorials

Anton Gerdelan - "Hello Triangle" - OpenGL 4 Up and Running
Anton Gerdelan - Cube Maps: Sky Boxes and Environment Mapping
Anton Gerdelan - Vertex Buffer Objects
Learning Modern 3D Graphics Programming - Chapter 5. Objects in Depth [Vertex Array Objects, Indexed Drawing]
open.gl - Framebuffers
open.gl - Geometry Shaders
open.gl - The Graphics Pipeline
open.gl - Transform Feedback
opengl-tutorial.org - Tutorial 14 : Render To Texture
opengl-tutorial.org - Tutorial 2 : The first triangle

## Version Support

| OpenGL Version
--- | ---
Function / Feature Name | 2.0 | 2.1 | 3.0 | 3.1 | 3.2 | 3.3 | 4.0 | 4.1 | 4.2 | 4.3 | 4.4 | 4.5
`glBindVertexArray` | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔

## See Also

glDeleteVertexArrays, glEnableVertexAttribArray, glGenVertexArrays, glIsVertexArray, glVertexAttribPointer

## Copyright

Copyright © 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. https://opencontent.org/openpub/.

Think you can improve this page? Edit this page on GitHub.