View Full Version : Drawing part of a VBO

04-17-2007, 11:22 PM
I am playing around with ideas to optimize BSP level geometry. What would be ideal is if I could set the vertex and indice arrays with VBOs, then go through and draw parts of the geometry.

I can do this with standard vertex arrays, but is there any way to draw a portion of a static element array? For example, one section of the world might be indices 20,000-30,000, and I might only want to draw that section, not the whole array. Can I do this?

04-18-2007, 01:20 AM
Yes, you can. In glDrawElements or glDrawArrays pass offset instead of pointer or 0.

04-18-2007, 05:11 PM
Thanks, it works.