jdryg / vg-renderer

A vector graphics renderer for bgfx, based on ideas from NanoVG and ImDrawList (Dear ImGUI)
BSD 2-Clause "Simplified" License
503 stars 55 forks source link

feat: use bgfx::TransientVertexBuffer / TransientIndexBuffer #35

Open simsaens opened 2 months ago

simsaens commented 2 months ago

Opening this as a draft, this is @johntm's original change to vg-renderer to use bgfx transient buffers. Will work with John to write a better PR description

jdryg commented 2 months ago

I'd suggest putting all those changes inside preprocessor blocks (e.g. #if VG_CONFIG_USE_TRANSIENT_BUFFERS) in order not to break existing functionality. You might also want to hide (#if !VG_CONFIG_USE_TRANSIENT_BUFFERS) GPUVertexBuffer and GPUIndexBuffer and all code which use them.