Closed jpaver closed 3 years ago
FYI @mrpossoms
The intention behind ogt_voxel_meshify_context was really just to be an allocator context - and in my engine I provide a per-thread devmode allocator for cooking on many threads at once. I know it wasn't very well documented/named for that, but that was the intention. It wasn't supposed to be a catch-all to prevent api overspecification.
I also wanted it to be clear of anything that is not applicable to all APIs that take the context because I wanted to avoid confusion from other users eg. If they set the emit_ctx member of the context but then later switch their call to the _greedy or _polygon generators, they might get stuck on figuring out why their callback is not getting called.
In addition, I wanted to:
Specifically, this PR:
Let me know if that works for you and I can get it in.
@jpaver Yep this definitely looks like it would take care of my use case! My apologies for effectively forcing you to write the feature I needed 😆
@jpaver Yep this definitely looks like it would take care of my use case! My apologies for effectively forcing you to write the feature I needed 😆
Haha no worries, glad you're getting some use out of it ;)
Added new function ogt_stream_from_paletted_voxels_simple which is a simple variant of ogt_mesh_from_paletted_voxels_simple that does not return an ogt_mesh, but rather calls into a user-provided function.
The use case for this is to
Internally, ogt_mesh_from_paletted_voxels_simple simply uses ogt_stream_from_paletted_voxels_simple to build up the ogt_mesh now.