1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Print CPU and GPU usage statistics after Movie Maker is finished

This commit is contained in:
myaaaaaaaaa
2023-04-30 14:55:29 -04:00
parent 9f12e7b52d
commit c55892cc5c
3 changed files with 22 additions and 7 deletions

View File

@@ -3305,10 +3305,7 @@ bool Main::iteration() {
}
if (movie_writer) {
RID main_vp_rid = RenderingServer::get_singleton()->viewport_find_from_screen_attachment(DisplayServer::MAIN_WINDOW_ID);
RID main_vp_texture = RenderingServer::get_singleton()->viewport_get_texture(main_vp_rid);
Ref<Image> vp_tex = RenderingServer::get_singleton()->texture_2d_get(main_vp_texture);
movie_writer->add_frame(vp_tex);
movie_writer->add_frame();
}
if ((quit_after > 0) && (Engine::get_singleton()->_process_frames >= quit_after)) {