diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-21 03:12:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-21 03:12:26 +0300 |
commit | 923b366549297b30b7226cb2f9985e5bbcc15c4c (patch) | |
tree | d30dd1cd73eb486056ee2e36ea057c77f9b4a75e /source/blender/draw/engines/workbench | |
parent | c53ebfa9e90c21c24181cd649e00aa918d9c8a87 (diff) |
DRW: set 4 clipping planes for box-clip
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c index 427ae4063f9..e70b33d047a 100644 --- a/source/blender/draw/engines/workbench/workbench_data.c +++ b/source/blender/draw/engines/workbench/workbench_data.c @@ -91,9 +91,9 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd) { RegionView3D *rv3d = draw_ctx->rv3d; if (rv3d->rflag & RV3D_CLIPPING) { - memcpy(wpd->world_clip_planes, rv3d->clip, sizeof(float[6][4])); wpd->world_clip_planes_len = (rv3d->viewlock & RV3D_BOXCLIP) ? 4 : 6; - DRW_state_clip_planes_count_set(6); + memcpy(wpd->world_clip_planes, rv3d->clip, sizeof(float[4]) * wpd->world_clip_planes_len); + DRW_state_clip_planes_count_set(wpd->world_clip_planes_len); } else { wpd->world_clip_planes_len = 0; |