# OpenGL VBO and scene graph

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

## Recommended Posts

Hi, I'm using VBO for an OpenGL project, but I have a few questions. I'm still a newbie when it comes to VBO. My project uses a scene graph to render all of the objects. Let's say that I have a cube (6 faces/squares). Each square has an array of vertices. Something like this:
Cube
|
|-- Square - array vertices
|-- Square - array vertices
|-- Square - ...
|-- ...


At a given time, I can split one square into four small squares.
Cube
|
|-- Square - array vertices
|      |
|      |-- Square - array of vertices
|      |-- Square - array of vertices
|      |-- ..
|
|-- Square - array of vertices
|-- ..


I don't want to iterate throught all the scene graph to make one array (with all the squares vertices) each time a square gets split. Is there any other way to draw this cube using VBO? Can VBO use an array of references to do that? Each position pointing to one of the array of vertices of a square. And, with such a dynamic scene, is VBO the best solution? Thank you =) Edit: Please tell me if my post doesn't make any sense :P

##### Share on other sites
Sounds like you have dynamic data so make a dynamic VBO and fill it with whatever you want each frame.

Quote:
 I don't want to iterate throught all the scene graph to make one array (with all the squares vertices) each time a square gets split. Is there any other way to draw this cube using VBO?

You would have to.

1. 1
2. 2
3. 3
Rutin
12
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633695
• Total Posts
3013384
×