|
Blender
V2.93
|
#include "GPU_primitive.h"Go to the source code of this file.
Classes | |
| struct | GPUIndexBufBuilder |
Macros | |
| #define | GPU_INDEXBUF_DISCARD_SAFE(elem) |
Typedefs | |
| typedef struct GPUIndexBuf | GPUIndexBuf |
| typedef struct GPUIndexBufBuilder | GPUIndexBufBuilder |
GPU index buffer
Definition in file GPU_index_buffer.h.
| #define GPU_INDEXBUF_DISCARD_SAFE | ( | elem | ) |
Definition at line 88 of file GPU_index_buffer.h.
| typedef struct GPUIndexBuf GPUIndexBuf |
Opaque type hiding blender::gpu::IndexBuf.
Definition at line 1 of file GPU_index_buffer.h.
| typedef struct GPUIndexBufBuilder GPUIndexBufBuilder |
| void GPU_indexbuf_add_generic_vert | ( | GPUIndexBufBuilder * | builder, |
| uint | v | ||
| ) |
Definition at line 69 of file gpu_index_buffer.cc.
References GPUIndexBufBuilder::data, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_index_len, and v.
Referenced by curve_create_curves_lines(), DRW_cache_bone_stick_get(), DRW_cache_cursor_get(), gpencil_lines_indices_cb(), GPU_indexbuf_add_line_adj_verts(), GPU_indexbuf_add_line_verts(), GPU_indexbuf_add_point_vert(), GPU_indexbuf_add_tri_verts(), hair_batch_cache_fill_segments_indices(), particle_batch_cache_fill_segments(), particle_batch_cache_fill_segments_edit(), particle_batch_cache_fill_segments_indices(), and pygpu_IndexBuf__tp_new().
| void GPU_indexbuf_add_line_adj_verts | ( | GPUIndexBufBuilder * | builder, |
| uint | v1, | ||
| uint | v2, | ||
| uint | v3, | ||
| uint | v4 | ||
| ) |
Definition at line 117 of file gpu_index_buffer.cc.
References GPU_indexbuf_add_generic_vert(), GPU_PRIM_LINES_ADJ, GPUIndexBufBuilder::prim_type, v1, and v2.
Referenced by DRW_cache_bone_box_wire_get(), DRW_cache_bone_octahedral_wire_get(), DRW_displist_indexbuf_create_edges_adjacency_lines(), extract_lines_adjacency_finish(), lines_adjacency_triangle(), and set_edge_adjacency_lines_indices().
| void GPU_indexbuf_add_line_verts | ( | GPUIndexBufBuilder * | builder, |
| uint | v1, | ||
| uint | v2 | ||
| ) |
Definition at line 96 of file gpu_index_buffer.cc.
References GPU_indexbuf_add_generic_vert(), GPU_PRIM_LINES, GPUIndexBufBuilder::prim_type, v1, and v2.
Referenced by curve_create_edit_data_and_handles(), drw_volume_wireframe_cb(), edituv_edge_add(), GPU_pbvh_bmesh_buffers_update(), gpu_pbvh_grid_fill_index_buffers(), GPU_pbvh_mesh_buffers_build(), lattice_batch_cache_get_edges(), set_overlay_wires_quad_tri_indices(), and set_overlay_wires_tri_indices().
| void GPU_indexbuf_add_point_vert | ( | GPUIndexBufBuilder * | builder, |
| uint | v | ||
| ) |
Definition at line 88 of file gpu_index_buffer.cc.
References GPU_indexbuf_add_generic_vert(), GPU_PRIM_POINTS, GPUIndexBufBuilder::prim_type, and v.
Referenced by curve_create_edit_data_and_handles(), and edituv_point_add().
| void GPU_indexbuf_add_primitive_restart | ( | GPUIndexBufBuilder * | builder | ) |
Definition at line 79 of file gpu_index_buffer.cc.
References GPUIndexBufBuilder::data, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_index_len, and RESTART_INDEX.
Referenced by curve_create_curves_lines(), DRW_cache_bone_stick_get(), DRW_cache_cursor_get(), gpencil_lines_indices_cb(), hair_batch_cache_fill_segments_indices(), particle_batch_cache_fill_segments(), particle_batch_cache_fill_segments_edit(), and particle_batch_cache_fill_segments_indices().
| void GPU_indexbuf_add_tri_verts | ( | GPUIndexBufBuilder * | builder, |
| uint | v1, | ||
| uint | v2, | ||
| uint | v3 | ||
| ) |
Definition at line 106 of file gpu_index_buffer.cc.
References GPU_indexbuf_add_generic_vert(), GPU_PRIM_TRIS, GPUIndexBufBuilder::prim_type, v1, and v2.
Referenced by DRW_cache_cube_get(), DRW_displist_indexbuf_create_triangles_in_order(), DRW_displist_indexbuf_create_triangles_loop_split_by_material(), drw_volume_selection_surface_cb(), edituv_tri_add(), gpencil_buffer_add_fill(), GPU_batch_tris_from_poly_2d_encoded(), GPU_pbvh_bmesh_buffers_update(), gpu_pbvh_grid_fill_index_buffers(), pointcloud_batch_cache_ensure_geom(), ui_batch_roundbox_widget_get(), and wm_gizmo_geometryinfo_draw().
| GPUIndexBuf* GPU_indexbuf_build | ( | GPUIndexBufBuilder * | builder | ) |
Definition at line 323 of file gpu_index_buffer.cc.
References GPU_indexbuf_build_in_place(), and GPU_indexbuf_calloc().
Referenced by DRW_cache_bone_box_wire_get(), DRW_cache_bone_octahedral_wire_get(), DRW_cache_bone_stick_get(), DRW_cache_cube_get(), DRW_cache_cursor_get(), DRW_cache_gpencil_face_wireframe_get(), drw_volume_selection_surface_cb(), drw_volume_wireframe_cb(), gpencil_batches_ensure(), gpencil_sbuffer_stroke_ensure(), GPU_batch_tris_from_poly_2d_encoded(), GPU_pbvh_bmesh_buffers_update(), gpu_pbvh_grid_fill_index_buffers(), GPU_pbvh_mesh_buffers_build(), hair_batch_cache_ensure_procedural_indices(), lattice_batch_cache_get_edges(), particle_batch_cache_ensure_edit_pos_and_seg(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_indices(), pointcloud_batch_cache_ensure_geom(), pygpu_IndexBuf__tp_new(), ui_batch_roundbox_widget_get(), and wm_gizmo_geometryinfo_draw().
| void GPU_indexbuf_build_in_place | ( | GPUIndexBufBuilder * | builder, |
| GPUIndexBuf * | elem | ||
| ) |
Definition at line 337 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPUIndexBufBuilder::index_len, and blender::gpu::unwrap().
Referenced by curve_create_curves_lines(), curve_create_edit_data_and_handles(), DRW_displist_indexbuf_create_edges_adjacency_lines(), DRW_displist_indexbuf_create_lines_in_order(), DRW_displist_indexbuf_create_triangles_in_order(), DRW_displist_indexbuf_create_triangles_loop_split_by_material(), extract_edituv_fdots_finish(), extract_edituv_lines_finish(), extract_edituv_points_finish(), extract_edituv_tris_finish(), extract_fdots_finish(), extract_lines_adjacency_finish(), extract_lines_finish(), extract_lines_paint_mask_finish(), extract_lines_with_lines_loose_finish(), extract_points_finish(), extract_tris_finish(), GPU_indexbuf_build(), and GPU_pbvh_bmesh_buffers_update().
| GPUIndexBuf* GPU_indexbuf_calloc | ( | void | ) |
Definition at line 318 of file gpu_index_buffer.cc.
References blender::gpu::wrap().
Referenced by DRW_ibo_request(), DRW_metaball_batch_cache_get_triangles_with_normals(), DRW_metaball_batch_cache_get_wireframes_face(), extract_tris_finish(), GPU_indexbuf_build(), GPU_indexbuf_create_subrange(), and mball_batch_cache_get_edges_adj_lines().
| GPUIndexBuf* GPU_indexbuf_create_subrange | ( | GPUIndexBuf * | elem_src, |
| uint | start, | ||
| uint | length | ||
| ) |
Definition at line 330 of file gpu_index_buffer.cc.
References GPU_indexbuf_calloc(), GPU_indexbuf_create_subrange_in_place(), and length().
| void GPU_indexbuf_create_subrange_in_place | ( | GPUIndexBuf * | elem, |
| GPUIndexBuf * | elem_src, | ||
| uint | start, | ||
| uint | length | ||
| ) |
Definition at line 346 of file gpu_index_buffer.cc.
References length(), and blender::gpu::unwrap().
Referenced by extract_lines_loose_subbuffer(), extract_tris_finish(), and GPU_indexbuf_create_subrange().
| void GPU_indexbuf_discard | ( | GPUIndexBuf * | elem | ) |
Definition at line 354 of file gpu_index_buffer.cc.
References blender::gpu::unwrap().
Referenced by GPU_batch_clear(), GPU_batch_elembuf_set(), and pygpu_IndexBuf__tp_dealloc().
| void GPU_indexbuf_init | ( | GPUIndexBufBuilder * | builder, |
| GPUPrimType | prim_type, | ||
| uint | prim_len, | ||
| uint | vertex_len | ||
| ) |
Definition at line 57 of file gpu_index_buffer.cc.
References GPU_indexbuf_init_ex(), and GPU_indexbuf_primitive_len().
Referenced by curve_create_edit_data_and_handles(), DRW_cache_bone_box_wire_get(), DRW_cache_bone_octahedral_wire_get(), DRW_cache_cube_get(), DRW_displist_indexbuf_create_edges_adjacency_lines(), DRW_displist_indexbuf_create_lines_in_order(), DRW_displist_indexbuf_create_triangles_in_order(), DRW_displist_indexbuf_create_triangles_loop_split_by_material(), drw_volume_selection_surface_cb(), drw_volume_wireframe_cb(), extract_edituv_fdots_init(), extract_edituv_lines_init(), extract_edituv_points_init(), extract_edituv_tris_init(), extract_fdots_init(), extract_lines_adjacency_init(), extract_lines_init(), extract_lines_paint_mask_init(), extract_points_init(), extract_tris_init(), gpencil_batches_ensure(), gpencil_sbuffer_stroke_ensure(), GPU_batch_tris_from_poly_2d_encoded(), GPU_pbvh_bmesh_buffers_update(), GPU_pbvh_grid_buffers_update(), gpu_pbvh_grid_fill_index_buffers(), GPU_pbvh_mesh_buffers_build(), lattice_batch_cache_get_edges(), pointcloud_batch_cache_ensure_geom(), pygpu_IndexBuf__tp_new(), ui_batch_roundbox_widget_get(), and wm_gizmo_geometryinfo_draw().
| void GPU_indexbuf_init_ex | ( | GPUIndexBufBuilder * | builder, |
| GPUPrimType | prim_type, | ||
| uint | index_len, | ||
| uint | vertex_len | ||
| ) |
Definition at line 45 of file gpu_index_buffer.cc.
References GPUIndexBufBuilder::data, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_allowed_index, GPUIndexBufBuilder::max_index_len, MEM_callocN, and GPUIndexBufBuilder::prim_type.
Referenced by curve_create_curves_lines(), DRW_cache_bone_stick_get(), DRW_cache_cursor_get(), DRW_cache_gpencil_face_wireframe_get(), GPU_indexbuf_init(), hair_batch_cache_ensure_procedural_indices(), particle_batch_cache_ensure_edit_pos_and_seg(), particle_batch_cache_ensure_pos_and_seg(), and particle_batch_cache_ensure_procedural_indices().
| bool GPU_indexbuf_is_init | ( | GPUIndexBuf * | elem | ) |
Definition at line 359 of file gpu_index_buffer.cc.
References blender::gpu::unwrap().
Referenced by DRW_ibo_requested().
| int GPU_indexbuf_primitive_len | ( | GPUPrimType | prim_type | ) |
Definition at line 364 of file gpu_index_buffer.cc.
References blender::gpu::indices_per_primitive().
Referenced by GPU_indexbuf_init(), and pygpu_IndexBuf__tp_new().
| void GPU_indexbuf_set_line_restart | ( | GPUIndexBufBuilder * | builder, |
| uint | elem | ||
| ) |
Definition at line 182 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPU_PRIM_LINES, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_index_len, GPUIndexBufBuilder::prim_type, and RESTART_INDEX.
Referenced by extract_lines_iter_ledge_bm(), extract_lines_iter_ledge_mesh(), extract_lines_iter_poly_bm(), extract_lines_iter_poly_mesh(), and extract_lines_paint_mask_iter_poly_mesh().
| void GPU_indexbuf_set_line_verts | ( | GPUIndexBufBuilder * | builder, |
| uint | elem, | ||
| uint | v1, | ||
| uint | v2 | ||
| ) |
Definition at line 140 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPU_PRIM_LINES, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_index_len, GPUIndexBufBuilder::prim_type, v1, and v2.
Referenced by extract_lines_iter_ledge_bm(), extract_lines_iter_ledge_mesh(), extract_lines_iter_poly_bm(), extract_lines_iter_poly_mesh(), and extract_lines_paint_mask_iter_poly_mesh().
| void GPU_indexbuf_set_point_restart | ( | GPUIndexBufBuilder * | builder, |
| uint | elem | ||
| ) |
Definition at line 172 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPU_PRIM_POINTS, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::prim_type, and RESTART_INDEX.
Referenced by edituv_facedot_add(), extract_fdots_iter_poly_bm(), extract_fdots_iter_poly_mesh(), vert_set_bm(), and vert_set_mesh().
| void GPU_indexbuf_set_point_vert | ( | GPUIndexBufBuilder * | builder, |
| uint | elem, | ||
| uint | v1 | ||
| ) |
Definition at line 130 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPU_PRIM_POINTS, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::prim_type, and v1.
Referenced by edituv_facedot_add(), extract_fdots_iter_poly_bm(), extract_fdots_iter_poly_mesh(), vert_set_bm(), and vert_set_mesh().
| void GPU_indexbuf_set_tri_restart | ( | GPUIndexBufBuilder * | builder, |
| uint | elem | ||
| ) |
Definition at line 194 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPU_PRIM_TRIS, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_index_len, GPUIndexBufBuilder::prim_type, and RESTART_INDEX.
| void GPU_indexbuf_set_tri_verts | ( | GPUIndexBufBuilder * | builder, |
| uint | elem, | ||
| uint | v1, | ||
| uint | v2, | ||
| uint | v3 | ||
| ) |
Definition at line 155 of file gpu_index_buffer.cc.
References BLI_assert, GPUIndexBufBuilder::data, GPU_PRIM_TRIS, GPUIndexBufBuilder::index_len, GPUIndexBufBuilder::max_index_len, GPUIndexBufBuilder::prim_type, v1, and v2.
Referenced by extract_tris_iter_looptri_bm(), and extract_tris_iter_looptri_mesh().