This is just out of mere interest, but is there a limit to the amount of vertecies GL_VERTEX_ARRAY will 'hold' and render through something like drawArrays()? Or could I theoretically pass through a few million vertexes and still be able to call drawArrays()?
Since OpenGL-1.2 a sort of limitation applies when using glDrawRangeElements
:
Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling
GetIntegerv
with the symbolic constantsMAX_ELEMENTS_VERTICES
andMAX_ELEMENTS_INDICES
. If end-start+1 is greater than the value ofMAX_ELEMENTS_VERTICES
, or if count is greater than the value ofMAX_ELEMENTS_INDICES
, then the call may operate at reduced performance. There is no requirement that all vertices in the range start; end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be achieved with an optimal index set.
But that's more of a recommendation, that a hard constraint. Other than that, the true limit is the amount of memory installed, and what can be addressed by the chosen type for the index element array
However the limits for glDrawRangeElements
usually also make a good indication for batch sizes in general.