diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-28 11:39:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-28 11:39:20 +0300 |
commit | 29c8c6cf4f8a6d1af19e9c14517928388ed4926a (patch) | |
tree | 47caa7d2a47ba7c45c9090ba23a6edca9ab60934 /source | |
parent | 89264d8c40293697abbe28200e6c6c1c2e2e2960 (diff) |
Fix T56940: crash rendering with OpenGL as engine.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_forward.c | 4 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_render.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index ca8f06ce146..0d4329c9699 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -365,11 +365,11 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata) { float blend_threshold = 0.0f; - if (draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) { + if (wpd->shading.flag & XRAY_FLAG(wpd)) { blend_threshold = 0.75f - XRAY_ALPHA(wpd) * 0.5f; } - if (draw_ctx->v3d->shading.type == OB_WIRE) { + if (wpd->shading.type == OB_WIRE) { wpd->shading.xray_alpha = 0.0f; wpd->shading.xray_alpha_wire = 0.0f; } diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c index 67059dae861..9a3efa97935 100644 --- a/source/blender/draw/engines/workbench/workbench_render.c +++ b/source/blender/draw/engines/workbench/workbench_render.c @@ -137,7 +137,7 @@ void workbench_render(WORKBENCH_Data *data, RenderEngine *engine, RenderLayer *r return; } - const bool deferred = (scene->display.shading.flag & XRAY_FLAG(draw_ctx->v3d)) == 0; + const bool deferred = (scene->display.shading.flag & XRAY_FLAG(&scene->display)) == 0; if (deferred) { /* Init engine. */ |