Closed aconstlink closed 5 months ago
If the sleep in the test application is removed, the gui renders corretly:
This piece of code is removed.
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) ) ;
It seems the issue is in the synchronization of how render_engine
is doing it. See the render_frame
function
It seems the bug happens only if the geometry object is not configured properly in the d3d11 backend. If construct_geo
is called with 0 sized geometry and updated subsequently, the bug happens. If the construct_geo
is called with a proper != 0 geometry count, the bug does not happen. So the bug should be around there. See construct_geo
in d3d11.cpp
.
Here I just altered the imgui buffer so only 4 vertices and 6 indices are rendered through the imgui motor impl with just too little construct_geo
calls:
But if the call to construct_geo
is done with a geometry count != 0:
It seems, this is a timing bug. If the call to the function is done in the correct moment the rendering works. Otherwise not.
In d3d11 backend, there was no index buffer created during geometry configuration if no indices were in the buffer. So now the index buffer is created but the rendering condition for DrawIndexed
needed to change with it.
Current state:
At the moment, I do not have any clue where this could come from.