mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-03 12:38:11 +00:00
eliminate mid-frame calls into full update step via os_window_first_paint; pull up outside regular frontend frame boundaries; fixes incorrect per-frame dbgi scope usage
This commit is contained in:
+6
-12
@@ -8358,18 +8358,12 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
|||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: show window after first frame
|
//- rjf: increment per-window frame counter
|
||||||
//
|
//
|
||||||
{
|
ws->frames_alive += 1;
|
||||||
if(ws->frames_alive == 0)
|
|
||||||
{
|
|
||||||
os_window_first_paint(ws->os);
|
|
||||||
}
|
|
||||||
ws->frames_alive += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ProfEnd();
|
ProfEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-4
@@ -279,8 +279,10 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data)
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: begin frame
|
//- 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
|
//- 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.
|
//- 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
|
//- rjf: submit rendering to all windows
|
||||||
@@ -365,6 +369,18 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data)
|
|||||||
r_end_frame();
|
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
|
//- rjf: determine frame time, record into history
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user