Tip: VBO & GLVertexPointer

The following information comes from NVidia’s article: Using VBOs. It is here for easy access for myself and anyone reading this blog and wanting to know more.

Warning: This information is to be ignored if you’re using recent GL version (3.x and above forward compatible) which most creative frameworks still don’t.

“Avoid Calling glVertexPointer() more than once per VBO
The “glVertexPointer” function does a lot of setup in VBO, so to avoid redundancy. The most efficient way to do is to bind the VBO buffer, setup various array pointers (glNormalPointer etc) and then call glVertexPointer(). glVertexPointer should be called one time for one VBO. You might think the essentials of VBO management are done in glBindBufferARB(), but it’s the opposite. VBO systems wait for the next upcoming important function (like glVertexPointer). The binding operation is cheap compared to the setup of various pointers. This advice fits any other function working in the same manner as glVertexPointer().”

From NVIDIA website.

No Comments, Comment or Ping

Comments are closed.