Archived
1
Fork 0

Move current frame counting to rendering instead of during the imgui pass

This commit is contained in:
redstrate 2021-04-18 21:39:53 -04:00
parent c47f54992f
commit 6a26ab4bef
2 changed files with 2 additions and 2 deletions

View file

@ -145,8 +145,6 @@ void ImGuiPass::render_post(GFXCommandBuffer* command_buffer, RenderTarget& targ
index_offset += cmd_list->IdxBuffer.Size;
vertex_offset += cmd_list->VtxBuffer.Size;
}
target.current_frame = (target.current_frame + 1) % RT_MAX_FRAMES_IN_FLIGHT;
}
void ImGuiPass::load_font(const std::string_view filename) {

View file

@ -389,6 +389,8 @@ void Renderer::render(GFXCommandBuffer* commandbuffer, Scene* scene, RenderTarge
pass->render_post(commandbuffer, target, index);
commandbuffer->pop_group();
target.current_frame = (target.current_frame + 1) % RT_MAX_FRAMES_IN_FLIGHT;
}
void Renderer::render_camera(GFXCommandBuffer* command_buffer, Scene& scene, Object camera_object, Camera& camera, prism::Extent extent, RenderTarget& target, ControllerContinuity& continuity) {