Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/edit_text_mode.c
| Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Lines | static void EDIT_TEXT_cache_populate(void *vedata, Object *ob) | ||||
| UNUSED_VARS(psl, stl); | UNUSED_VARS(psl, stl); | ||||
| if (ob->type == OB_FONT) { | if (ob->type == OB_FONT) { | ||||
| if (ob == draw_ctx->object_edit) { | if (ob == draw_ctx->object_edit) { | ||||
| const Curve *cu = ob->data; | const Curve *cu = ob->data; | ||||
| /* Get geometry cache */ | /* Get geometry cache */ | ||||
| struct GPUBatch *geom; | struct GPUBatch *geom; | ||||
| if (cu->flag & CU_FAST) { | bool has_surface = (cu->flag & (CU_FRONT | CU_BACK)) || cu->ext1 != 0.0f || cu->ext2 != 0.0f; | ||||
| if ((cu->flag & CU_FAST) || !has_surface) { | |||||
| geom = DRW_cache_text_edge_wire_get(ob); | geom = DRW_cache_text_edge_wire_get(ob); | ||||
| if (geom) { | if (geom) { | ||||
| DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); | DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* object mode draws */ | /* object mode draws */ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||