diff --git a/src/corelib/render.c b/src/corelib/render.c index 80e9e40..39539d9 100644 --- a/src/corelib/render.c +++ b/src/corelib/render.c @@ -20,6 +20,8 @@ float _render_width=0, _render_height=0; view_t g_active_view = DEFAULT_VIEW; +int d_debug_next_frame = 0; + void screen_to_view(float *x, float *y) { float xx = *x, yy = *y; @@ -119,8 +121,12 @@ drawcmd_delegate const drawcmd_funcs[] = { &exec_rect_cmd }; void exec_buffer() { + if(d_debug_next_frame) printf("debug capture of draw buffer\ncount: %zu\n", (size_t)(g_drawdata_endptr - g_drawdata)); for(const drawcmd_t* cmd = g_drawdata; cmd != g_drawdata_endptr; ++cmd) { if(cmd->type > DRAWCMDTYPE_MIN && cmd->type < DRAWCMDTYPE_MAX) { + if(d_debug_next_frame) { + printf("depth: %d, type: %d\n", cmd->depth, cmd->type); + } drawcmd_funcs[cmd->type](cmd); } }