diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index 4ba2ecea..8895d545 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -8358,18 +8358,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) scratch_end(scratch); } - - ////////////////////////////// - //- rjf: show window after first frame - // - { - if(ws->frames_alive == 0) - { - os_window_first_paint(ws->os); - } - ws->frames_alive += 1; - } - + + ////////////////////////////// + //- rjf: increment per-window frame counter + // + ws->frames_alive += 1; + ProfEnd(); } diff --git a/src/raddbg/raddbg.c b/src/raddbg/raddbg.c index a3ffec8f..f4cbe570 100644 --- a/src/raddbg/raddbg.c +++ b/src/raddbg/raddbg.c @@ -279,8 +279,10 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) ////////////////////////////// //- rjf: begin frame // - df_core_begin_frame(scratch.arena, &cmds, dt); - df_gfx_begin_frame(scratch.arena, &cmds); + { + df_core_begin_frame(scratch.arena, &cmds, dt); + df_gfx_begin_frame(scratch.arena, &cmds); + } ////////////////////////////// //- rjf: queue drop for drag/drop @@ -348,8 +350,10 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) ////////////////////////////// //- rjf: end frontend frame, send signals, etc. // - df_gfx_end_frame(); - df_core_end_frame(); + { + df_gfx_end_frame(); + df_core_end_frame(); + } ////////////////////////////// //- rjf: submit rendering to all windows @@ -365,6 +369,18 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) r_end_frame(); } + ////////////////////////////// + //- rjf: show windows after first frame + // + for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next) + { + if(w->frames_alive == 1) + { + os_window_first_paint(w->os); + } + } + + ////////////////////////////// //- rjf: determine frame time, record into history //