GLAPI/glBindVertexArray: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m Renaming category: 'API Reference 4' to 'Core API Reference'.
m Bot: Adding better formatting.
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
== Function Definition ==
== Function Definition ==


   void '''glBindVertexArray'''(GLuint ''array'');
   void '''glBindVertexArray'''(GLuint {{param|array}});


; array
; array
Line 15: Line 15:
== Description ==
== 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 [[GLAPI/glGenVertexArrays|glGenVertexArrays]], or zero to break the existing vertex array object binding.
'''glBindVertexArray''' binds the vertex array object with name {{param|array}}. {{param|array}} is the name of a vertex array object previously returned from a call to {{apifunc|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.
If no vertex array object with name {{param|array}} exists, one is created when {{param|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 ==
== Errors ==


{{code|GL_INVALID_OPERATION}} is generated if ''array'' is not zero or the name of a vertex array object previously returned from a call to [[GLAPI/glGenVertexArrays|glGenVertexArrays]].
{{enum|GL_INVALID_OPERATION}} is generated if {{param|array}} is not zero or the name of a vertex array object previously returned from a call to {{apifunc|glGenVertexArrays}}.


== See Also ==
== See Also ==


[[GLAPI/glGenVertexArrays|glGenVertexArrays]], [[GLAPI/glDeleteVertexArrays|glDeleteVertexArrays]][[GLAPI/glVertexAttribPointer|glVertexAttribPointer]][[GLAPI/glEnableVertexAttribArray|glEnableVertexAttribArray]]
{{apifunc|glGenVertexArrays}}, {{apifunc|glDeleteVertexArrays}}, {{apifunc|glIsVertexArray}}, {{apifunc|glVertexAttribPointer}}, {{apifunc|glEnableVertexAttribArray}}, {{apifunc|glVertexAttribBinding}}, {{apifunc|glVertexAttribDivisor}}, {{apifunc|glVertexAttribFormat}}, {{apifunc|glVertexAttribPointer}}, {{apifunc|glVertexBindingDivisor}}


== Copyright ==
== Copyright ==

Latest revision as of 01:39, 27 September 2012

glBindVertexArray
Core in version 4.6
Core since version 3.0

glBindVertexArray: bind a vertex array object

Function Definition

 void glBindVertexArray(GLuint array​);
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.

See Also

glGenVertexArrays, glDeleteVertexArrays, glIsVertexArray, glVertexAttribPointer, glEnableVertexAttribArray, glVertexAttribBinding, glVertexAttribDivisor, glVertexAttribFormat, glVertexAttribPointer, glVertexBindingDivisor

Copyright

Copyright © 2010 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. http://opencontent.org/openpub/.