make View3D depth debug code optional

Quick hack to optionally disable depth buffer debugging at compile time.

Will this be useful for users or just during development?
This commit is contained in:
Mike Erwin
2016-10-25 04:46:07 -04:00
parent bc566e9393
commit d8d42e1702

View File

@@ -275,6 +275,11 @@ static void view3d_stereo3d_setup(Scene *scene, View3D *v3d, ARegion *ar)
/* ******************** debug ***************** */
#define VIEW3D_DRAW_DEBUG 1
/* TODO: expand scope of this flag so UI reflects the underlying code */
#if VIEW3D_DRAW_DEBUG
static void view3d_draw_debug_store_depth(ARegion *ar, DrawData *draw_data)
{
GPUViewport *viewport = draw_data->viewport;
@@ -337,6 +342,8 @@ static void view3d_draw_debug(const bContext *C, ARegion *ar, DrawData *draw_dat
}
}
#endif /* VIEW3D_DRAW_DEBUG */
/* ******************** view border ***************** */
static void view3d_camera_border(
@@ -1658,8 +1665,9 @@ static void view3d_draw_solid_plates(const bContext *C, ARegion *ar, DrawData *d
view3d_draw_render_draw(C, scene, ar, v3d, draw_data->clip_border, &draw_data->border_rect);
}
/* debug */
#if VIEW3D_DRAW_DEBUG
view3d_draw_debug_post_solid(C, ar, draw_data);
#endif
}
/**
@@ -1785,7 +1793,10 @@ static void view3d_draw_view(const bContext *C, ARegion *ar, DrawData *draw_data
view3d_draw_reference_images(C);
view3d_draw_manipulator(C);
view3d_draw_region_info(C, ar);
#if VIEW3D_DRAW_DEBUG
view3d_draw_debug(C, ar, draw_data);
#endif
}
void view3d_main_region_draw(const bContext *C, ARegion *ar)