added debug render frame flag
parent
96ffaf5f9e
commit
3e8eef4200
|
@ -20,6 +20,8 @@ float _render_width=0, _render_height=0;
|
||||||
|
|
||||||
view_t g_active_view = DEFAULT_VIEW;
|
view_t g_active_view = DEFAULT_VIEW;
|
||||||
|
|
||||||
|
int d_debug_next_frame = 0;
|
||||||
|
|
||||||
void screen_to_view(float *x, float *y) {
|
void screen_to_view(float *x, float *y) {
|
||||||
float xx = *x, yy = *y;
|
float xx = *x, yy = *y;
|
||||||
|
|
||||||
|
@ -119,8 +121,12 @@ drawcmd_delegate const drawcmd_funcs[] = {
|
||||||
&exec_rect_cmd
|
&exec_rect_cmd
|
||||||
};
|
};
|
||||||
void exec_buffer() {
|
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) {
|
for(const drawcmd_t* cmd = g_drawdata; cmd != g_drawdata_endptr; ++cmd) {
|
||||||
if(cmd->type > DRAWCMDTYPE_MIN && cmd->type < DRAWCMDTYPE_MAX) {
|
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);
|
drawcmd_funcs[cmd->type](cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue