Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_curve.c
| Show First 20 Lines • Show All 775 Lines • ▼ Show 20 Lines | static void curve_create_edit_data_and_handles(CurveRenderData *rdata, | ||||
| GPUIndexBufBuilder elb_verts, *elbp_verts = NULL; | GPUIndexBufBuilder elb_verts, *elbp_verts = NULL; | ||||
| GPUIndexBufBuilder elb_lines, *elbp_lines = NULL; | GPUIndexBufBuilder elb_lines, *elbp_lines = NULL; | ||||
| if (DRW_TEST_ASSIGN_IBO(ibo_edit_verts_points)) { | if (DRW_TEST_ASSIGN_IBO(ibo_edit_verts_points)) { | ||||
| elbp_verts = &elb_verts; | elbp_verts = &elb_verts; | ||||
| GPU_indexbuf_init(elbp_verts, GPU_PRIM_POINTS, verts_len_capacity, verts_len_capacity); | GPU_indexbuf_init(elbp_verts, GPU_PRIM_POINTS, verts_len_capacity, verts_len_capacity); | ||||
| } | } | ||||
| if (DRW_TEST_ASSIGN_IBO(ibo_edit_lines)) { | if (DRW_TEST_ASSIGN_IBO(ibo_edit_lines)) { | ||||
| elbp_lines = &elb_lines; | elbp_lines = &elb_lines; | ||||
| GPU_indexbuf_init(elbp_lines, GPU_PRIM_LINES, edges_len_capacity, verts_len_capacity); | GPU_indexbuf_init(elbp_lines, GPU_PRIM_LINES, verts_len_capacity, verts_len_capacity); | ||||
mano-wii: I understand that the problem is with the operator, so why change this part?
Although this… | |||||
| } | } | ||||
| int nu_id = 0; | int nu_id = 0; | ||||
| for (Nurb *nu = rdata->nurbs->first; nu; nu = nu->next, nu_id++) { | for (Nurb *nu = rdata->nurbs->first; nu; nu = nu->next, nu_id++) { | ||||
| const BezTriple *bezt = nu->bezt; | const BezTriple *bezt = nu->bezt; | ||||
| const BPoint *bp = nu->bp; | const BPoint *bp = nu->bp; | ||||
| if (bezt) { | if (bezt) { | ||||
| ▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines | |||||
I understand that the problem is with the operator, so why change this part?
Although this change is harmless (since verts_len_capacity is always greater than edges_len_capacity), it does not seem to be correct.