Consider the following OpenGL code snippet:
GLuint vao;
glCreateVertexArrays(1, glBindVertexArray(&vao));
I'm under the impression that what this code does is
- Creates a pointer, of type
GLuint, that will eventually point to an OpenGL Vertex Array Object. The name of this pointer isvao. - Indirectly allocates memory through OpenGL for the actual Vertex Array Object (i.e., no use of
mallocin C ornewin C++). The way that this is done is through the functionglCreateVertexArrays. This function also makes the pointervaopoint to the Vertex Array Object.
Is my understanding correct? If so, in (1), why is the type of the pointer GLuint and not explicitly defined as a pointer type (for example with * in C/C++ or with the OpenGL type GLintptr)?