• Advertisement
Sign in to follow this  

Can a single draw call reference multiple VBOs?

This topic is 4766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is a single call allowed to reference multiple VBOs, in a fashion similar to D3D vertex streams? That is, can I bind a buffer containing xyz, set the vetex pointer, then bind a buffer containing uv, set the tex coord pointer, and then draw with both buffers being used?

Share this post


Link to post
Share on other sites
Advertisement
Yeah, OGL uses the same functions for both ways, you just set the stride to 0 if you are using seperate buffers (what I do, and what I think is the preferred layout).

You can set a buffer for vertex xyz, a buffer for normals, for colors, for texcoors, and for a color index buffer.

see glVertexPointer et. al.
and glDrawArrays or glDrawElements (indexed version of ...Arrays)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement