Jump to content
  • Advertisement
Sign in to follow this  
Mr Lane

OpenGL Spatial Data Structures and Vertex Buffers

This topic is 4810 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 got a question about how I should use vertex buffers/arrays in conjunction with my space representation data structures in my editor and engine. I am using OpenGL. First things first, my engine is a CSG based engine, that will also support static meshes and terrain. Static meshes are a no brainer, I will just load them into a vertex array, put them in a buffer object and then upload to video card. Terrain, for now I will do the same, but something a little smarter will eventually be needed to divide it up. What I am more concerned with is what to do with my CSG geometry, and how this should be batched. With my engine, what I plan to do is use manually placed portals to divide the map into smaller zones. I have an algorthim on paper that will use some ray casting to see which portals have a possible line of sight visible from other portals. From here I can derive some PVS data and be able to tell which zones of a map are possibly visible from others. Each zone will then be a node in a Red-Black tree for quick finding. I guess this is kind of like Quake style PVS, but with manually placed portals instead of generated ones in a BSP tree. My question here, how should I store the geometry that makes up each zone? Should all the vertex data for each zone be stored into a big vertex array (and then buffer objects?). How do games like Quake 2 and 3 batch their BSP level geometry? Thanks

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!