Jump to content
  • Advertisement
Sign in to follow this  
fabiom

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!