Closed npnp closed 5 months ago
You didn't understood that correctly... bgfx::ViewMode
sets order of draw calls within the view, not view order. To set view order use bgfx::setViewOrder
https://bkaradzic.github.io/bgfx/bgfx.html#_CPPv4N4bgfx12setViewOrderE6ViewId8uint16_tPK6ViewId
There is example of usage here: https://github.com/bkaradzic/bgfx/blob/00fa5ad179f5aa13c1e44d0bcbccdc535aba2d00/examples/09-hdr/hdr.cpp#L450-L463
Oh yeah that makes sense, sorry for the noise!
Describe the bug
When bgfx::setViewMode is called with bgfx::ViewMode::Sequential, the order of views should be in the order in witch bgfx::submit calls where issued, however it seems that the views are always sorted by their ID:
To Reproduce
Modify the drawing loop section in the 01-cubes example to draw each cube in separate view:
Open the file in RenderDoc
Capture a frame and observe the view order: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10:
Expected behavior The order should be the same as order of submit calls, so: 0,8,6,3,10,5,2,7,1,9,4
If the order is set explictly using setViewOrder, then the behavior is as expected:
Additional context
PC Windows 10 Nvidia 3060 DirectX 11 & Vulkan renderers