Hello,
I currently try to implement realtime CSG. This means that I have a 3D mesh and want to apply boolean operations on it. After each boolean operation, new vertices are added/removed to/from the mesh. This should happen in realtime, so my vertex data changes every frame. Currently, it is extremely slow, because I'm rendering my mesh in the following way (C# with OpenTK):
GL.Begin(PrimitiveType.Triangles);
foreach(Polygon p in PolygonVector) {
foreach(Vertex v in p) {
GL.Normal3(v.Normal.x, v.Normal.y, v.Normal.z);
GL.Vertex3(v.x,v.y, v.z);
}
}
GL.End();
So my idea was to use VBOs instead. But this is not easy, because my geometry data is changing every frame and VBOs have a fixed size. So how do I handle this?
Would it be the best way to create a new vertex buffer object every frame with my current mesh?
If someone could point me in the right direction I'd very much appreciate it.