diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-02-05 14:57:00 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-02-05 15:05:58 +0300 |
commit | 4212ea7b7de70f2346e27505ae7e966a7830f038 (patch) | |
tree | d3d12e6bd130cf413b3ac81ca2df7e7681ca4e3c | |
parent | 0a546beb1f3a6b53fdd57da892ccdf893c269010 (diff) |
Fix T85260: Viewport render does not draw background
Regression introduced by {rBed809866b172} where overlays weren't drawn
when overlays are turned off. The background in wireframe, solid
(always) and material preview and render preview (when not using scene
world) are also part of the overlays.
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index f474ae542d9..bc41eab9e22 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1715,7 +1715,12 @@ void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph, GPU_matrix_identity_set(); GPU_matrix_identity_projection_set(); - const bool do_overlays = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0; + const bool do_overlays = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0 || + (ELEM(v3d->shading.type, OB_WIRE, OB_SOLID)) || + (ELEM(v3d->shading.type, OB_MATERIAL) && + (v3d->shading.flag & V3D_SHADING_SCENE_WORLD) == 0) || + (ELEM(v3d->shading.type, OB_RENDER) && + (v3d->shading.flag & V3D_SHADING_SCENE_WORLD_RENDER) == 0); GPU_viewport_unbind_from_offscreen(render_viewport, ofs, do_color_management, do_overlays); if (draw_background) { |