But can I be sure that rendering without binding to VBO is safe?
You can not.
The base profile of the OpenGL specification (3.2 and above) clearly states that it must be enabled so that you can display all disabled attributes. The compatibility profile of the OpenGL specification, or any version prior to 3.2, also clearly indicates that you cannot do this.
Of course, that doesn't matter. NVIDIA drivers allow you to do this in any version and profile of OpenGL. ATI drivers do not allow you to do this in any version or profile of OpenGL. Both of them are driver errors, in different ways.
You just need to recognize that you need a dummy vertex attribute. However:
But I need a lot of vertices, and I donβt want to store fake VBOs for them (it takes about 16 MB of memory).
The dummy attribute will occupy 4 bytes (one float or 4-vector of normalized bytes. Remember: you do not need data). So you could place 4 million of them in 16 MB.
Alternatively, you can use instance rendering through glDrawArraysInstanced. There you simply render one vertex, but with instances of num_vertices . Of course, your shader will have to use the instance id.
source share