Spatial Data Structures and Vertex Buffers

Started by
-1 comments, last by Mr Lane 18 years, 10 months ago
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

This topic is closed to new replies.

Advertisement