Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_mesh.c
| Show First 20 Lines • Show All 1,979 Lines • ▼ Show 20 Lines | struct { | ||||
| /* Indices to verts. */ | /* Indices to verts. */ | ||||
| GPUIndexBuf *surf_tris; | GPUIndexBuf *surf_tris; | ||||
| GPUIndexBuf *edges_lines; | GPUIndexBuf *edges_lines; | ||||
| GPUIndexBuf *edges_adj_lines; | GPUIndexBuf *edges_adj_lines; | ||||
| GPUIndexBuf *loose_edges_lines; | GPUIndexBuf *loose_edges_lines; | ||||
| /* Indices to vloops. */ | /* Indices to vloops. */ | ||||
| GPUIndexBuf *loops_tris; | GPUIndexBuf *loops_tris; | ||||
| GPUIndexBuf *loops_lines; | GPUIndexBuf *loops_lines; | ||||
| GPUIndexBuf *loops_lines_paint_mask; | |||||
| GPUIndexBuf *loops_line_strips; | GPUIndexBuf *loops_line_strips; | ||||
| /* Edit mode. */ | /* Edit mode. */ | ||||
| GPUIndexBuf *edit_loops_points; /* verts */ | GPUIndexBuf *edit_loops_points; /* verts */ | ||||
| GPUIndexBuf *edit_loops_lines; /* edges */ | GPUIndexBuf *edit_loops_lines; /* edges */ | ||||
| GPUIndexBuf *edit_loops_tris; /* faces */ | GPUIndexBuf *edit_loops_tris; /* faces */ | ||||
| /* Edit UVs */ | /* Edit UVs */ | ||||
| GPUIndexBuf *edituv_loops_points; /* verts */ | GPUIndexBuf *edituv_loops_points; /* verts */ | ||||
| GPUIndexBuf *edituv_loops_line_strips; /* edges */ | GPUIndexBuf *edituv_loops_line_strips; /* edges */ | ||||
| Show All 24 Lines | struct { | ||||
| GPUBatch *edit_selection_faces; | GPUBatch *edit_selection_faces; | ||||
| GPUBatch *edit_selection_facedots; | GPUBatch *edit_selection_facedots; | ||||
| /* Common display / Other */ | /* Common display / Other */ | ||||
| GPUBatch *all_verts; | GPUBatch *all_verts; | ||||
| GPUBatch *all_edges; | GPUBatch *all_edges; | ||||
| GPUBatch *loose_edges; | GPUBatch *loose_edges; | ||||
| GPUBatch *edge_detection; | GPUBatch *edge_detection; | ||||
| GPUBatch *wire_edges; /* Individual edges with face normals. */ | GPUBatch *wire_edges; /* Individual edges with face normals. */ | ||||
| GPUBatch *wire_loops; /* Loops around faces. */ | GPUBatch *wire_loops; /* Loops around faces. no edges between selected faces */ | ||||
| GPUBatch *wire_loops_uvs; /* Same as wire_loops but only has uvs. */ | GPUBatch *wire_loops_uvs; /* Same as wire_loops but only has uvs. */ | ||||
| } batch; | } batch; | ||||
| GPUIndexBuf **surf_per_mat_tris; | GPUIndexBuf **surf_per_mat_tris; | ||||
| GPUBatch **surf_per_mat; | GPUBatch **surf_per_mat; | ||||
| /* arrays of bool uniform names (and value) that will be use to | /* arrays of bool uniform names (and value) that will be use to | ||||
| * set srgb conversion for auto attributes.*/ | * set srgb conversion for auto attributes.*/ | ||||
| ▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | case BKE_MESH_BATCH_DIRTY_SELECT: | ||||
| MBC_EDIT_FACEDOTS | MBC_EDIT_SELECTION_FACEDOTS | | MBC_EDIT_FACEDOTS | MBC_EDIT_SELECTION_FACEDOTS | | ||||
| MBC_EDIT_MESH_ANALYSIS); | MBC_EDIT_MESH_ANALYSIS); | ||||
| /* Because visible UVs depends on edit mode selection, discard everything. */ | /* Because visible UVs depends on edit mode selection, discard everything. */ | ||||
| mesh_batch_cache_discard_uvedit(cache); | mesh_batch_cache_discard_uvedit(cache); | ||||
| break; | break; | ||||
| case BKE_MESH_BATCH_DIRTY_SELECT_PAINT: | case BKE_MESH_BATCH_DIRTY_SELECT_PAINT: | ||||
| /* Paint mode selection flag is packed inside the nor attrib. | /* Paint mode selection flag is packed inside the nor attrib. | ||||
| * Note that it can be slow if auto smooth is enabled. (see T63946) */ | * Note that it can be slow if auto smooth is enabled. (see T63946) */ | ||||
| GPU_INDEXBUF_DISCARD_SAFE(cache->ibo.loops_lines_paint_mask); | |||||
| GPU_VERTBUF_DISCARD_SAFE(cache->ordered.loop_pos_nor); | GPU_VERTBUF_DISCARD_SAFE(cache->ordered.loop_pos_nor); | ||||
| GPU_BATCH_DISCARD_SAFE(cache->batch.surface); | GPU_BATCH_DISCARD_SAFE(cache->batch.surface); | ||||
| GPU_BATCH_DISCARD_SAFE(cache->batch.wire_loops); | GPU_BATCH_DISCARD_SAFE(cache->batch.wire_loops); | ||||
| if (cache->surf_per_mat) { | if (cache->surf_per_mat) { | ||||
| for (int i = 0; i < cache->mat_len; i++) { | for (int i = 0; i < cache->mat_len; i++) { | ||||
| GPU_BATCH_DISCARD_SAFE(cache->surf_per_mat[i]); | GPU_BATCH_DISCARD_SAFE(cache->surf_per_mat[i]); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,545 Lines • ▼ Show 20 Lines | else { | ||||
| int v2 = mp->loopstart + (j + 1) % mp->totloop; | int v2 = mp->loopstart + (j + 1) % mp->totloop; | ||||
| GPU_indexbuf_add_line_verts(&elb, v1, v2); | GPU_indexbuf_add_line_verts(&elb, v1, v2); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else { | |||||
| /* Implement ... eventually if needed. */ | GPU_indexbuf_build_in_place(&elb, ibo); | ||||
| } | |||||
| static void mesh_create_loops_lines_paint_mask(MeshRenderData *rdata, GPUIndexBuf *ibo) | |||||
| { | |||||
| const int loop_len = mesh_render_data_loops_len_get(rdata); | |||||
| const int poly_len = mesh_render_data_polys_len_get(rdata); | |||||
| GPUIndexBufBuilder elb; | |||||
| GPU_indexbuf_init(&elb, GPU_PRIM_LINES, loop_len, loop_len); | |||||
| if (rdata->edit_bmesh) { | |||||
| /* painting does not use the edit_bmesh */ | |||||
| BLI_assert(0); | BLI_assert(0); | ||||
| } | } | ||||
| else { | |||||
| /* contains all edges where at least one face has been selected */ | |||||
| EdgeHash *edge_hash = BLI_edgehash_new(__func__); | |||||
| /* Fill the EdgeHash tables. */ | |||||
| for (int poly = 0; poly < poly_len; poly++) { | |||||
| const MPoly *mpoly = &rdata->mpoly[poly]; | |||||
| /* Do not check faces that are hidden and faces that aren't selected */ | |||||
| if (mpoly->flag & ME_HIDE || ((mpoly->flag & ME_FACE_SEL) == 0)) { | |||||
| continue; | |||||
| } | |||||
| for (int loop_index = 0; loop_index < mpoly->totloop; loop_index++) { | |||||
| const MLoop *mloop = &rdata->mloop[mpoly->loopstart + loop_index]; | |||||
| const MEdge *edge = (MEdge *)rdata->medge + mloop->e; | |||||
| const int v1 = edge->v1; | |||||
| const int v2 = edge->v2; | |||||
| void **edge_value; | |||||
| if (BLI_edgehash_ensure_p(edge_hash, v1, v2, &edge_value)) { | |||||
| *edge_value = POINTER_FROM_INT(POINTER_AS_INT(*edge_value) + 1); | |||||
| } | |||||
| else { | |||||
| *edge_value = POINTER_FROM_INT(1); | |||||
| } | |||||
| } | |||||
| } | |||||
| for (int poly = 0; poly < poly_len; poly++) { | |||||
jbakker: Postprocess edgehash to optimize the inner loop lookups. | |||||
jbakkerAuthorUnsubmitted Done Inline ActionsPerhaps we can do this later jbakker: Perhaps we can do this later | |||||
| const MPoly *mpoly = &rdata->mpoly[poly]; | |||||
Done Inline ActionsI am not sure how we could use the EdgeHashIterator as we need the vertex loop index in the index buffer. jbakker: I am not sure how we could use the EdgeHashIterator as we need the vertex loop index in the… | |||||
| if (!(mpoly->flag & ME_HIDE)) { | |||||
| for (int loop_index = 0; loop_index < mpoly->totloop; loop_index++) { | |||||
| const MLoop *mloop = &rdata->mloop[mpoly->loopstart + loop_index]; | |||||
| const MEdge *edge = (MEdge *)rdata->medge + mloop->e; | |||||
| int v1 = mpoly->loopstart + loop_index; | |||||
| int v2 = mpoly->loopstart + (loop_index + 1) % mpoly->totloop; | |||||
| void *edge_value = BLI_edgehash_lookup(edge_hash, edge->v1, edge->v2); | |||||
| if (edge_value == NULL || POINTER_AS_INT(edge_value) == 1) { | |||||
| GPU_indexbuf_add_line_verts(&elb, v1, v2); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| BLI_edgehash_free(edge_hash, NULL); | |||||
| } | |||||
| GPU_indexbuf_build_in_place(&elb, ibo); | GPU_indexbuf_build_in_place(&elb, ibo); | ||||
| } | } | ||||
| static void mesh_create_loops_line_strips(MeshRenderData *rdata, | static void mesh_create_loops_line_strips(MeshRenderData *rdata, | ||||
| GPUIndexBuf *ibo, | GPUIndexBuf *ibo, | ||||
| const bool use_hide) | const bool use_hide) | ||||
| { | { | ||||
| const int loop_len = mesh_render_data_loops_len_get(rdata); | const int loop_len = mesh_render_data_loops_len_get(rdata); | ||||
| const int poly_len = mesh_render_data_polys_len_get(rdata); | const int poly_len = mesh_render_data_polys_len_get(rdata); | ||||
| GPUIndexBufBuilder elb; | GPUIndexBufBuilder elb; | ||||
| GPU_indexbuf_init_ex(&elb, GPU_PRIM_LINE_STRIP, loop_len + poly_len * 2, loop_len); | GPU_indexbuf_init_ex(&elb, GPU_PRIM_LINE_STRIP, loop_len + poly_len * 2, loop_len); | ||||
| uint v_index = 0; | uint v_index = 0; | ||||
| if (rdata->mapped.use == false) { | if (rdata->mapped.use == false) { | ||||
| if (rdata->edit_bmesh) { | if (rdata->edit_bmesh) { | ||||
| BMesh *bm = rdata->edit_bmesh->bm; | BMesh *bm = rdata->edit_bmesh->bm; | ||||
| BMIter iter; | BMIter iter; | ||||
| BMFace *bm_face; | BMFace *bm_face; | ||||
| BM_ITER_MESH (bm_face, &iter, bm, BM_FACES_OF_MESH) { | BM_ITER_MESH (bm_face, &iter, bm, BM_FACES_OF_MESH) { | ||||
Done Inline ActionsIt's more efficient to have a single hash with the value being the number of selected faces. brecht: It's more efficient to have a single hash with the value being the number of selected faces. | |||||
| /* use_hide always for edit-mode */ | /* use_hide always for edit-mode */ | ||||
| if (!BM_elem_flag_test(bm_face, BM_ELEM_HIDDEN)) { | if (!BM_elem_flag_test(bm_face, BM_ELEM_HIDDEN)) { | ||||
| for (int i = 0; i < bm_face->len; i++) { | for (int i = 0; i < bm_face->len; i++) { | ||||
| GPU_indexbuf_add_generic_vert(&elb, v_index + i); | GPU_indexbuf_add_generic_vert(&elb, v_index + i); | ||||
| } | } | ||||
| /* Finish loop and restart primitive. */ | /* Finish loop and restart primitive. */ | ||||
| GPU_indexbuf_add_generic_vert(&elb, v_index); | GPU_indexbuf_add_generic_vert(&elb, v_index); | ||||
| GPU_indexbuf_add_primitive_restart(&elb); | GPU_indexbuf_add_primitive_restart(&elb); | ||||
| } | } | ||||
| v_index += bm_face->len; | v_index += bm_face->len; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| for (int poly = 0; poly < poly_len; poly++) { | for (int poly = 0; poly < poly_len; poly++) { | ||||
| const MPoly *mp = &rdata->mpoly[poly]; | const MPoly *mp = &rdata->mpoly[poly]; | ||||
| if (!(use_hide && (mp->flag & ME_HIDE))) { | if (!(use_hide && (mp->flag & ME_HIDE))) { | ||||
| const int loopend = mp->loopstart + mp->totloop; | const int loopend = mp->loopstart + mp->totloop; | ||||
| for (int j = mp->loopstart; j < loopend; j++) { | for (int j = mp->loopstart; j < loopend; j++) { | ||||
| GPU_indexbuf_add_generic_vert(&elb, j); | GPU_indexbuf_add_generic_vert(&elb, j); | ||||
| } | } | ||||
| /* Finish loop and restart primitive. */ | /* Finish loop and restart primitive. */ | ||||
| GPU_indexbuf_add_generic_vert(&elb, mp->loopstart); | GPU_indexbuf_add_generic_vert(&elb, mp->loopstart); | ||||
| GPU_indexbuf_add_primitive_restart(&elb); | GPU_indexbuf_add_primitive_restart(&elb); | ||||
Done Inline ActionsIt would be more efficient to iterator over the hash. brecht: It would be more efficient to iterator over the hash. | |||||
| } | } | ||||
| v_index += mp->totloop; | v_index += mp->totloop; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* Implement ... eventually if needed. */ | /* Implement ... eventually if needed. */ | ||||
| BLI_assert(0); | BLI_assert(0); | ||||
| } | } | ||||
| GPU_indexbuf_build_in_place(&elb, ibo); | GPU_indexbuf_build_in_place(&elb, ibo); | ||||
| } | } | ||||
| static void mesh_create_loose_edges_lines(MeshRenderData *rdata, | static void mesh_create_loose_edges_lines(MeshRenderData *rdata, | ||||
| GPUIndexBuf *ibo, | GPUIndexBuf *ibo, | ||||
| bool *r_no_loose_wire, | bool *r_no_loose_wire, | ||||
| const bool use_hide) | const bool use_hide) | ||||
| { | { | ||||
| const int vert_len = mesh_render_data_verts_len_get_maybe_mapped(rdata); | const int vert_len = mesh_render_data_verts_len_get_maybe_mapped(rdata); | ||||
| const int edge_len = mesh_render_data_edges_len_get_maybe_mapped(rdata); | const int edge_len = mesh_render_data_edges_len_get_maybe_mapped(rdata); | ||||
Done Inline ActionsWhich case is this? Can we add an explanation why this is not needed now? brecht: Which case is this? Can we add an explanation why this is not needed now? | |||||
Done Inline ActionsWas copy paste mistake, will remove the if statement to use mapped data jbakker: Was copy paste mistake, will remove the if statement to use mapped data | |||||
| /* Alloc max (edge_len) and upload only needed range. */ | /* Alloc max (edge_len) and upload only needed range. */ | ||||
| GPUIndexBufBuilder elb; | GPUIndexBufBuilder elb; | ||||
| GPU_indexbuf_init(&elb, GPU_PRIM_LINES, edge_len, vert_len); | GPU_indexbuf_init(&elb, GPU_PRIM_LINES, edge_len, vert_len); | ||||
| if (rdata->mapped.use == false) { | if (rdata->mapped.use == false) { | ||||
| if (rdata->edit_bmesh) { | if (rdata->edit_bmesh) { | ||||
| /* No need to support since edit mesh already draw them. | /* No need to support since edit mesh already draw them. | ||||
| ▲ Show 20 Lines • Show All 1,180 Lines • ▼ Show 20 Lines | if (DRW_batch_requested(cache->batch.edge_detection, GPU_PRIM_LINES_ADJ)) { | ||||
| DRW_ibo_request(cache->batch.edge_detection, &cache->ibo.edges_adj_lines); | DRW_ibo_request(cache->batch.edge_detection, &cache->ibo.edges_adj_lines); | ||||
| DRW_vbo_request(cache->batch.edge_detection, &cache->ordered.pos_nor); | DRW_vbo_request(cache->batch.edge_detection, &cache->ordered.pos_nor); | ||||
| } | } | ||||
| if (DRW_batch_requested(cache->batch.surface_weights, GPU_PRIM_TRIS)) { | if (DRW_batch_requested(cache->batch.surface_weights, GPU_PRIM_TRIS)) { | ||||
| DRW_ibo_request(cache->batch.surface_weights, &cache->ibo.surf_tris); | DRW_ibo_request(cache->batch.surface_weights, &cache->ibo.surf_tris); | ||||
| DRW_vbo_request(cache->batch.surface_weights, &cache->ordered.pos_nor); | DRW_vbo_request(cache->batch.surface_weights, &cache->ordered.pos_nor); | ||||
| DRW_vbo_request(cache->batch.surface_weights, &cache->ordered.weights); | DRW_vbo_request(cache->batch.surface_weights, &cache->ordered.weights); | ||||
| } | } | ||||
| if (DRW_batch_requested(cache->batch.wire_loops, GPU_PRIM_LINE_STRIP)) { | if (DRW_batch_requested(cache->batch.wire_loops, GPU_PRIM_LINES)) { | ||||
| DRW_ibo_request(cache->batch.wire_loops, &cache->ibo.loops_line_strips); | DRW_ibo_request(cache->batch.wire_loops, &cache->ibo.loops_lines_paint_mask); | ||||
| DRW_vbo_request(cache->batch.wire_loops, &cache->ordered.loop_pos_nor); | DRW_vbo_request(cache->batch.wire_loops, &cache->ordered.loop_pos_nor); | ||||
| } | } | ||||
| if (DRW_batch_requested(cache->batch.wire_edges, GPU_PRIM_LINES)) { | if (DRW_batch_requested(cache->batch.wire_edges, GPU_PRIM_LINES)) { | ||||
| DRW_ibo_request(cache->batch.wire_edges, &cache->ibo.loops_lines); | DRW_ibo_request(cache->batch.wire_edges, &cache->ibo.loops_lines); | ||||
| DRW_vbo_request(cache->batch.wire_edges, &cache->ordered.loop_pos_nor); | DRW_vbo_request(cache->batch.wire_edges, &cache->ordered.loop_pos_nor); | ||||
| DRW_vbo_request(cache->batch.wire_edges, &cache->ordered.loop_edge_fac); | DRW_vbo_request(cache->batch.wire_edges, &cache->ordered.loop_edge_fac); | ||||
| } | } | ||||
| if (DRW_batch_requested(cache->batch.wire_loops_uvs, GPU_PRIM_LINE_STRIP)) { | if (DRW_batch_requested(cache->batch.wire_loops_uvs, GPU_PRIM_LINE_STRIP)) { | ||||
| ▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | DRW_ADD_FLAG_FROM_VBO_REQUEST( | ||||
| mr_flag, cache->ordered.loop_edge_fac, MR_DATATYPE_VERT_LOOP_POLY | MR_DATATYPE_EDGE); | mr_flag, cache->ordered.loop_edge_fac, MR_DATATYPE_VERT_LOOP_POLY | MR_DATATYPE_EDGE); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.surf_tris, MR_DATATYPE_VERT_LOOP_POLY | MR_DATATYPE_LOOPTRI); | mr_flag, cache->ibo.surf_tris, MR_DATATYPE_VERT_LOOP_POLY | MR_DATATYPE_LOOPTRI); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.loops_tris, MR_DATATYPE_LOOP | MR_DATATYPE_POLY | MR_DATATYPE_LOOPTRI); | mr_flag, cache->ibo.loops_tris, MR_DATATYPE_LOOP | MR_DATATYPE_POLY | MR_DATATYPE_LOOPTRI); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.loops_lines, MR_DATATYPE_LOOP | MR_DATATYPE_EDGE | MR_DATATYPE_POLY); | mr_flag, cache->ibo.loops_lines, MR_DATATYPE_LOOP | MR_DATATYPE_EDGE | MR_DATATYPE_POLY); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST(mr_flag, | |||||
| cache->ibo.loops_lines_paint_mask, | |||||
| MR_DATATYPE_LOOP | MR_DATATYPE_EDGE | MR_DATATYPE_POLY); | |||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.loops_line_strips, MR_DATATYPE_LOOP | MR_DATATYPE_POLY); | mr_flag, cache->ibo.loops_line_strips, MR_DATATYPE_LOOP | MR_DATATYPE_POLY); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.edges_lines, MR_DATATYPE_VERT | MR_DATATYPE_EDGE); | mr_flag, cache->ibo.edges_lines, MR_DATATYPE_VERT | MR_DATATYPE_EDGE); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.edges_adj_lines, MR_DATATYPE_VERT_LOOP_POLY | MR_DATATYPE_LOOPTRI); | mr_flag, cache->ibo.edges_adj_lines, MR_DATATYPE_VERT_LOOP_POLY | MR_DATATYPE_LOOPTRI); | ||||
| DRW_ADD_FLAG_FROM_IBO_REQUEST( | DRW_ADD_FLAG_FROM_IBO_REQUEST( | ||||
| mr_flag, cache->ibo.loose_edges_lines, MR_DATATYPE_VERT | MR_DATATYPE_EDGE); | mr_flag, cache->ibo.loose_edges_lines, MR_DATATYPE_VERT | MR_DATATYPE_EDGE); | ||||
| ▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | mesh_create_loose_edges_lines( | ||||
| rdata, cache->ibo.loose_edges_lines, &cache->no_loose_wire, use_hide); | rdata, cache->ibo.loose_edges_lines, &cache->no_loose_wire, use_hide); | ||||
| } | } | ||||
| if (DRW_ibo_requested(cache->ibo.surf_tris)) { | if (DRW_ibo_requested(cache->ibo.surf_tris)) { | ||||
| mesh_create_surf_tris(rdata, cache->ibo.surf_tris, use_hide); | mesh_create_surf_tris(rdata, cache->ibo.surf_tris, use_hide); | ||||
| } | } | ||||
| if (DRW_ibo_requested(cache->ibo.loops_lines)) { | if (DRW_ibo_requested(cache->ibo.loops_lines)) { | ||||
| mesh_create_loops_lines(rdata, cache->ibo.loops_lines, use_hide); | mesh_create_loops_lines(rdata, cache->ibo.loops_lines, use_hide); | ||||
| } | } | ||||
| if (DRW_ibo_requested(cache->ibo.loops_lines_paint_mask)) { | |||||
| mesh_create_loops_lines_paint_mask(rdata, cache->ibo.loops_lines_paint_mask); | |||||
| } | |||||
| if (DRW_ibo_requested(cache->ibo.loops_line_strips)) { | if (DRW_ibo_requested(cache->ibo.loops_line_strips)) { | ||||
| mesh_create_loops_line_strips(rdata, cache->ibo.loops_line_strips, use_hide); | mesh_create_loops_line_strips(rdata, cache->ibo.loops_line_strips, use_hide); | ||||
| } | } | ||||
| if (DRW_ibo_requested(cache->ibo.loops_tris)) { | if (DRW_ibo_requested(cache->ibo.loops_tris)) { | ||||
| mesh_create_loops_tris(rdata, &cache->ibo.loops_tris, 1, use_hide); | mesh_create_loops_tris(rdata, &cache->ibo.loops_tris, 1, use_hide); | ||||
| } | } | ||||
| if (DRW_ibo_requested(cache->surf_per_mat_tris[0])) { | if (DRW_ibo_requested(cache->surf_per_mat_tris[0])) { | ||||
| mesh_create_loops_tris(rdata, cache->surf_per_mat_tris, cache->mat_len, use_hide); | mesh_create_loops_tris(rdata, cache->surf_per_mat_tris, cache->mat_len, use_hide); | ||||
| ▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines | |||||
Postprocess edgehash to optimize the inner loop lookups.