PDA

View Full Version : Drawing part of a VBO



Leadwerks
04-17-2007, 10: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?

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

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