Say you have a vertex buffer object containing 300 vertices, and you have 100 faces which access this vertex object, each sorted by a material ID (say, 10 different materials). If I bind the vertex object 10 different times (for the 10 different materials) during a frame, will this be a severe performance hit? Will it go and transform the vertex buffer object each of the 10 times? Or is it safe to use it like this?
Binding doesn’t mean transforming, it sets the base address of the data.
The start address is associated with gl…Pointer and the call to the drawing function (glDrawElements etc.) finally tells OpenGL which of the data in the arrays to use.