Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_engine.c
| Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | static void OVERLAY_cache_init(void *vedata) | ||||
| OVERLAY_gpencil_cache_init(vedata); | OVERLAY_gpencil_cache_init(vedata); | ||||
| OVERLAY_grid_cache_init(vedata); | OVERLAY_grid_cache_init(vedata); | ||||
| OVERLAY_image_cache_init(vedata); | OVERLAY_image_cache_init(vedata); | ||||
| OVERLAY_metaball_cache_init(vedata); | OVERLAY_metaball_cache_init(vedata); | ||||
| OVERLAY_motion_path_cache_init(vedata); | OVERLAY_motion_path_cache_init(vedata); | ||||
| OVERLAY_outline_cache_init(vedata); | OVERLAY_outline_cache_init(vedata); | ||||
| OVERLAY_particle_cache_init(vedata); | OVERLAY_particle_cache_init(vedata); | ||||
| OVERLAY_wireframe_cache_init(vedata); | OVERLAY_wireframe_cache_init(vedata); | ||||
| OVERLAY_volume_cache_init(vedata); | |||||
| } | } | ||||
| BLI_INLINE OVERLAY_DupliData *OVERLAY_duplidata_get(Object *ob, void *vedata, bool *do_init) | BLI_INLINE OVERLAY_DupliData *OVERLAY_duplidata_get(Object *ob, void *vedata, bool *do_init) | ||||
| { | { | ||||
| OVERLAY_DupliData **dupli_data = (OVERLAY_DupliData **)DRW_duplidata_get(vedata); | OVERLAY_DupliData **dupli_data = (OVERLAY_DupliData **)DRW_duplidata_get(vedata); | ||||
| *do_init = false; | *do_init = false; | ||||
| if (!ELEM(ob->type, OB_MESH, OB_SURF, OB_LATTICE, OB_CURVE, OB_FONT)) { | if (!ELEM(ob->type, OB_MESH, OB_SURF, OB_LATTICE, OB_CURVE, OB_FONT)) { | ||||
| return NULL; | return NULL; | ||||
| ▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | static void OVERLAY_cache_populate(void *vedata, Object *ob) | ||||
| } | } | ||||
| if (draw_outlines) { | if (draw_outlines) { | ||||
| OVERLAY_outline_cache_populate(vedata, ob, dupli, do_init); | OVERLAY_outline_cache_populate(vedata, ob, dupli, do_init); | ||||
| } | } | ||||
| if (draw_bone_selection) { | if (draw_bone_selection) { | ||||
| OVERLAY_pose_cache_populate(vedata, ob); | OVERLAY_pose_cache_populate(vedata, ob); | ||||
| } | } | ||||
| if (ob->type == OB_VOLUME) { | |||||
| OVERLAY_volume_cache_populate(vedata, ob); | |||||
| } | |||||
| if (in_edit_mode && !pd->hide_overlays) { | if (in_edit_mode && !pd->hide_overlays) { | ||||
| switch (ob->type) { | switch (ob->type) { | ||||
| case OB_MESH: | case OB_MESH: | ||||
| OVERLAY_edit_mesh_cache_populate(vedata, ob); | OVERLAY_edit_mesh_cache_populate(vedata, ob); | ||||
| if (draw_edit_weights) { | if (draw_edit_weights) { | ||||
| OVERLAY_paint_weight_cache_populate(vedata, ob); | OVERLAY_paint_weight_cache_populate(vedata, ob); | ||||
| } | } | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | if (DRW_state_is_fbo()) { | ||||
| GPU_framebuffer_bind(fbl->overlay_line_fb); | GPU_framebuffer_bind(fbl->overlay_line_fb); | ||||
| } | } | ||||
| OVERLAY_wireframe_draw(vedata); | OVERLAY_wireframe_draw(vedata); | ||||
| OVERLAY_armature_draw(vedata); | OVERLAY_armature_draw(vedata); | ||||
| OVERLAY_particle_draw(vedata); | OVERLAY_particle_draw(vedata); | ||||
| OVERLAY_metaball_draw(vedata); | OVERLAY_metaball_draw(vedata); | ||||
| OVERLAY_gpencil_draw(vedata); | OVERLAY_gpencil_draw(vedata); | ||||
| OVERLAY_volume_draw(vedata); | |||||
| OVERLAY_extra_draw(vedata); | OVERLAY_extra_draw(vedata); | ||||
| if (DRW_state_is_fbo()) { | if (DRW_state_is_fbo()) { | ||||
| GPU_framebuffer_bind(fbl->overlay_color_only_fb); | GPU_framebuffer_bind(fbl->overlay_color_only_fb); | ||||
| } | } | ||||
| OVERLAY_xray_fade_draw(vedata); | OVERLAY_xray_fade_draw(vedata); | ||||
| OVERLAY_grid_draw(vedata); | OVERLAY_grid_draw(vedata); | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||