Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/drawobject.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 9,617 Lines • ▼ Show 20 Lines | if (use_select) { | ||||
| GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_FLAT_COLOR_U32); | GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_FLAT_COLOR_U32); | ||||
| GWN_batch_draw(batch); | GWN_batch_draw(batch); | ||||
| } | } | ||||
| else { | else { | ||||
| int selcol; | int selcol; | ||||
| GPU_select_index_get(0, &selcol); | GPU_select_index_get(0, &selcol); | ||||
| batch = DRW_mesh_batch_cache_get_triangles_with_select_mask(me, true); | batch = DRW_mesh_batch_cache_get_triangles_with_select_mask(me, true); | ||||
| GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR_U32); | GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR_U32); | ||||
| GWN_batch_uniform_1i(batch, "color", selcol); | GWN_batch_uniform_1ui(batch, "color", selcol); | ||||
| GWN_batch_draw(batch); | GWN_batch_draw(batch); | ||||
| } | } | ||||
| } | } | ||||
| #endif | #endif | ||||
| #ifdef USE_MESH_DM_SELECT | #ifdef USE_MESH_DM_SELECT | ||||
| static void bbs_mesh_solid__drawCenter(void *userData, int index, const float cent[3], const float UNUSED(no[3])) | static void bbs_mesh_solid__drawCenter(void *userData, int index, const float cent[3], const float UNUSED(no[3])) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | static void bbs_mesh_solid_verts(const EvaluationContext *UNUSED(eval_ctx), Scene *UNUSED(scene), Object *ob) | ||||
| G.f &= ~G_BACKBUFSEL; | G.f &= ~G_BACKBUFSEL; | ||||
| { | { | ||||
| int selcol; | int selcol; | ||||
| Gwn_Batch *batch; | Gwn_Batch *batch; | ||||
| GPU_select_index_get(0, &selcol); | GPU_select_index_get(0, &selcol); | ||||
| batch = DRW_mesh_batch_cache_get_triangles_with_select_mask(me, true); | batch = DRW_mesh_batch_cache_get_triangles_with_select_mask(me, true); | ||||
| GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR_U32); | GWN_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR_U32); | ||||
| GWN_batch_uniform_1i(batch, "color", selcol); | GWN_batch_uniform_1ui(batch, "color", selcol); | ||||
| GWN_batch_draw(batch); | GWN_batch_draw(batch); | ||||
| } | } | ||||
| G.f |= (G_f_orig & G_BACKBUFSEL); | G.f |= (G_f_orig & G_BACKBUFSEL); | ||||
| bbs_obmode_mesh_verts(ob, NULL, 1); | bbs_obmode_mesh_verts(ob, NULL, 1); | ||||
| bm_vertoffs = me->totvert + 1; | bm_vertoffs = me->totvert + 1; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines | |||||