In my application, I’m going to use the UI on ImGui to control the scene, for this I decided to render and manage the rendering of the UI and the scene in separate threads. I will also use separate logical resources and command queues for the UI render and scene threads.
I will have 3 threads:
- The basic thread of the application that will take the rendered data from other threads and display it.
- Thread for the UI render.
- Thread for rendering the scene.
How can I implement such a system?
As far as I understand, I should render the framebuffer and immediately give it to the main thread, right?
And the second question concerns how I can combine the results of the render.
In this case, I need both renderers not to overwrite each other.
For example, if the scene is rendered first, and then the UI, then the UI should not overwrite the scene. I suppose I can protect myself from this by using scissors, right?