PDA

View Full Version : draw part of VBO?



supagu
04-25-2004, 05:53 PM
is it possible to draw just aprt of a VBO if you somehow provide opengl with a stat index and a the number of polys to draw?

otherwise i will have to divide my index buffer into smaller VBO's which would be very annoying :-/

thx

Korval
04-25-2004, 06:58 PM
Yes. You provide OpenGL with a start index (offset) and a number of polys to draw. Which is what glDrawElements takes.

Leadwerks
04-17-2007, 11:26 PM
Yes. You provide OpenGL with a start index (offset) and a number of polys to draw. Which is what glDrawElements takes.Please explain how this works with VBOs. When you render a VBO the last parameter is a null pointer.

Korval
04-17-2007, 11:40 PM
Please explain how this works with VBOs. When you render a VBO the last parameter is a null pointer.You resurrected a 3 year old thread for that question? One that would be answered simply by going to the " OpenGL SDK (http://www.opengl.org/sdk/docs/man/xhtml/glBindBuffer.xml) "?

Leadwerks
04-18-2007, 05:09 PM
I just guessed that a pointer to an integer offset would do it, and got it working.

OpenGL SDK = "blah, blah, blah"

EPSILON = 0.001
Abs( OpenGL SDK - Needle in a haystack ) < EPSILON