I'm sure it's just that I'm new to the langauge(not coding), but I'm having a little trouble here, perhaps you can help.
I'm using PB to write an engine, or at least part of an engine, for another language. Obviously, I want to keep all the mesh/surface structs on the pb side, as it offers a lot more control over low-level stuff. I'm just not sure what is the most effective way?
Linked lists seem to be unusable, because I'd need a unique one for each mesh. (For a pool of tris/verts)
AllocateMemory, seems like a good call, but I don't like the idea of re-allocating the entire memory buffer just to add a new vert. Which would mean having to pre-allocate the right size. Fine for non-dynamic meshes.
But imagine something like progressive Vis(I.e a virtual mesh that is dynamically growing/shrinking) and it will cripple the engine.
Using a custom linked list, is also out, because I would then need to create a second list for each tri, so I can index them. It's out because it's an hopefully avoidable bottleneck.
I admit to beng a little shocked that you can't have empty pointers to structs within structures?
Say,
structure Surface
*surface.surf[100],surfCount
endStructure
Doing this, it compiles fine, but whenever I add any code to actually assign a variable I'm stumped. Because PB appears to have no New operator.
I admit it's my experiance in previous languages that is probably the problem here, not anything generally wrong with PB. So any suggestions would be great. I'm going around in cricles, too scared to commit to any idea in case I'm missing something.
