GLGENVERTEXARRAYS(3G)
π GLGENVERTEXARRAYS(3G) π
okay bestie, welcome to the glGenVertexArrays page β it's part of the OpenGL 3G manual, and honestly? it's a little icon. let's get into it β¨
πΈ NAME πΈ
glGenVertexArrays β generate vertex array object names π
β¨ C SPECIFICATION β¨
void glGenVertexArrays(GLsizei n, GLuint *arrays);
that's it. that's the whole signature. she's simple, she's effective π
π¦ PARAMETERS π¦
nβ how many vertex array object names you want to generate. yes, you get to pick the number. main character energy π₯arraysβ the array where the generated vertex array object names get stored. this is where the magic lands, bestie π«Ά
π DESCRIPTION π
okay so here's the tea: glGenVertexArrays hands you back n vertex array object names, and it drops them into arrays. π
now β important β there is no guarantee that the names it gives you form a contiguous set of integers. like, they're not gonna be 1, 2, 3, 4 all cute and in a row. nope. the vibes are chaotic. however (and this part is a promise), it is guaranteed that none of the returned names was in use immediately before the call to glGenVertexArrays. so no duplicates, no collisions, we love that for us β¨
also, the names you get back from a glGenVertexArrays call are not returned by subsequent calls β unless you first delete them with glDeleteVertexArrays(). so like, they're taken. claimed. spoken for. π
and one more thing, because it's giving subtle-but-important: the names returned in arrays are marked as used for the purposes of glGenVertexArrays only. they don't actually have state or type yet β they only acquire state and type when they're first bound. so don't come for them before they've been bound, they're literally just names at this point π
π ERRORS π
GL_INVALID_VALUEgets generated ifnis negative. so don't. negativenis not the vibe. just don't do it, bestie π
β VERSION SUPPORT β
so the original page has this whole grid situation going on, but the info is: here's which OpenGL versions support glGenVertexArrays. let me break it down for you by version π
- OpenGL 2.0 β nope,
-(not supported) π - OpenGL 2.1 β also nope,
-(not supported) π - OpenGL 3.0 β YES,
βπ - OpenGL 3.1 β
βπ₯ - OpenGL 3.2 β
βπ₯ - OpenGL 3.3 β
βπ₯ - OpenGL 4.0 β
βπ₯ - OpenGL 4.1 β
βπ₯ - OpenGL 4.2 β
βπ₯ - OpenGL 4.3 β
βπ₯ - OpenGL 4.4 β
βπ₯ - OpenGL 4.5 β
βπ₯
so basically: she showed up in 3.0 and never left. ate and stayed. periodt π«Ά
π SEE ALSO π
glBindVertexArray()glDeleteVertexArrays()
go read those too, they're literally the other halves of this whole story iykyk π§
π 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. http://opencontent.org/openpub/.
Copyright Β© 2010-2014 Khronos Group
okay that's the whole page, bestie, you're officially educated on vertex array object name generation π ily, go bind something.
this little number came from [FIXME: source] and it's dated 08/09/2021 β yeah, the header up top is [FIXME: manual], she's a work in progress and we respect that π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms