An OpenGL Toolbox
Sumanta Guha · 2018
This chapter examines frequently-used OpenGL programming devices: vertex arrays and their drawing commands; vertex buffer objects; vertex array objects; and display lists. OpenGL offers specific devices the vertex array data structures which make it easy and efficient for the user to centralize and share data. Vertex arrays make for efficient, logical and conceptually clean OpenGL code. OpenGL’s client-server model means that each time the server requires vertex data for example, coordinates, color or such to execute, say, a glDrawElements() call it must be fetched from the client. The chapter focuses on buffer objects which store vertex data, such being called vertex buffer objects (VBO). A busy scene with many objects, each coded up with its own vertex arrays, possibly buffered in VBOs as well, will likely require switching multiple times between these sets of arrays and buffers, leading to a proliferation of calls such as glBindBuffer() and glVertexPointer().