The old immediate-mode API ( glBegin/ glEnd) is probably just implemented as a fat wrapper around the driver's internal vertex buffer system.įor static objects, create a static VBO and fill it with your vertex data. In the general sense, though, everything these days is done with a VBO ( vertex buffer object).
What are the best ways and OpenGL tools to send the order to render vertex data that seldom changes during the frames (i think of terrain and objects) and what it the best way to send vertex data that changes a lot during frames?īroadly, the answer is "it depends." The way one would send particle updates is quite a bit different than the way you would send a series of GPU-skinned models. While for more "unstable" information probably you have to send new vertex data every frame and so a different tecnique might be more efficient.Ĭoming to my question: I would like a clear explanation of the most modern and efficient OpenGL functions and tecniques used to send vertex information to the hardware and to give instruction to render. I guess there are methods to store in the graphic card memory the information that does not change at every frame so that when you render each frame that information is already there.
However this method sounds quite antique and inefficient when you have to draw thousands of triangles. I am studying from the OpenGL official guide and the first presented method is to call a function glVertex after the glBegin for each vertex you want to draw. There will be tons of triangles for terrain and objects in use.