diff options
Diffstat (limited to 'source/blender/draw/modes/overlay_mode.c')
-rw-r--r-- | source/blender/draw/modes/overlay_mode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c index 3c31001d4b7..e2b381347ff 100644 --- a/source/blender/draw/modes/overlay_mode.c +++ b/source/blender/draw/modes/overlay_mode.c @@ -49,7 +49,7 @@ typedef struct OVERLAY_Data { typedef struct OVERLAY_PrivateData { DRWShadingGroup *face_orientation_shgrp; - int overlays; + View3DOverlay overlay; } OVERLAY_PrivateData; /* Transient data */ /* *********** STATIC *********** */ @@ -90,14 +90,14 @@ static void overlay_cache_init(void *vedata) View3D *v3d = DCS->v3d; if (v3d) { - stl->g_data->overlays = v3d->overlays; + stl->g_data->overlay = v3d->overlay; } else { - stl->g_data->overlays = 0; + memset(&stl->g_data->overlay, 0, sizeof(stl->g_data->overlay)); } /* Face Orientation Pass */ - if (stl->g_data->overlays & V3D_OVERLAY_FACE_ORIENTATION) { + if (stl->g_data->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) { int state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND; psl->face_orientation_pass = DRW_pass_create("Face Orientation", state); stl->g_data->face_orientation_shgrp = DRW_shgroup_create(e_data.face_orientation_sh, psl->face_orientation_pass); @@ -116,7 +116,7 @@ static void overlay_cache_populate(void *vedata, Object *ob) struct Gwn_Batch *geom = DRW_cache_object_surface_get(ob); if (geom) { /* Face Orientation */ - if (stl->g_data->overlays & V3D_OVERLAY_FACE_ORIENTATION) { + if (stl->g_data->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) { DRW_shgroup_call_add(pd->face_orientation_shgrp, geom, ob->obmat); } } @@ -133,7 +133,7 @@ static void overlay_draw_scene(void *vedata) OVERLAY_StorageList *stl = data->stl; OVERLAY_PrivateData *pd = stl->g_data; - if (pd->overlays & V3D_OVERLAY_FACE_ORIENTATION) { + if (pd->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) { DRW_draw_pass(psl->face_orientation_pass); } } |