-
thanks for your time . in some bgfx' examples, we alloc TransientVertexBuffer/TransientIndexBuffer, and copy mem to these buffer, in main loop. is it necessary ? (eg: 03-raymarch, TextBufferManager ) what's the guideline ? what's the time to use TransientVertexBuffer instead of normal buffer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
First definition of transient:
https://www.merriam-webster.com/dictionary/transient It's special buffer type for index/vertex buffers that are changing every frame. It's there as convenience as fire&forget, so you don't have to manually manage buffers that are changing all the time. Also, as we know what's life-time of these buffers, it allows some internal optimizations. Transient - changes every frame |
Beta Was this translation helpful? Give feedback.
First definition of transient:
https://www.merriam-webster.com/dictionary/transient
It's special buffer type for index/vertex buffers that are changing every frame. It's there as convenience as fire&forget, so you don't have to manually manage buffers that are changing all the time. Also, as we know what's life-time of these buffers, it allows some internal optimizations.
Transient - changes every frame
Dynamic - changes sometimes (if you don't pass data on creation, buffer/texture is dynamic)
Static - never changes (if you pass data to any creation function, it's assumed that buffer/texture is immutable)