Can a single draw call reference multiple VBOs?

Started by
2 comments, last by Shannon Barber 19 years, 3 months ago
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?
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
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)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
this also extend to the GLSL generic buffers as well
Also check out the ARB_vertex_buffer_object extention, nVidia has a pdf on using GL VBO's here
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement