|
Blender
V2.93
|
#include <stddef.h>Go to the source code of this file.
Typedefs | |
| typedef struct GPU_PBVH_Buffers | GPU_PBVH_Buffers |
Enumerations | |
| enum | { GPU_PBVH_BUFFERS_SHOW_MASK = (1 << 1) , GPU_PBVH_BUFFERS_SHOW_VCOL = (1 << 2) , GPU_PBVH_BUFFERS_SHOW_SCULPT_FACE_SETS = (1 << 3) } |
Functions | |
| GPU_PBVH_Buffers * | GPU_pbvh_mesh_buffers_build (const struct MPoly *mpoly, const struct MLoop *mloop, const struct MLoopTri *looptri, const struct MVert *mvert, const int *face_indices, const int *sculpt_face_sets, const int face_indices_len, const struct Mesh *mesh) |
| GPU_PBVH_Buffers * | GPU_pbvh_grid_buffers_build (int totgrid, unsigned int **grid_hidden) |
| GPU_PBVH_Buffers * | GPU_pbvh_bmesh_buffers_build (bool smooth_shading) |
| void | GPU_pbvh_bmesh_buffers_update_free (GPU_PBVH_Buffers *buffers) |
| void | GPU_pbvh_grid_buffers_update_free (GPU_PBVH_Buffers *buffers, const struct DMFlagMat *grid_flag_mats, const int *grid_indices) |
| void | GPU_pbvh_mesh_buffers_update (GPU_PBVH_Buffers *buffers, const struct MVert *mvert, const float *vmask, const struct MLoopCol *vcol, const int *sculpt_face_sets, const int face_sets_color_seed, const int face_sets_color_default, const struct MPropCol *vtcol, const int update_flags) |
| void | GPU_pbvh_bmesh_buffers_update (GPU_PBVH_Buffers *buffers, struct BMesh *bm, struct GSet *bm_faces, struct GSet *bm_unique_verts, struct GSet *bm_other_verts, const int update_flags) |
| void | GPU_pbvh_grid_buffers_update (GPU_PBVH_Buffers *buffers, struct SubdivCCG *subdiv_ccg, struct CCGElem **grids, const struct DMFlagMat *grid_flag_mats, int *grid_indices, int totgrid, const int *sculpt_face_sets, const int face_sets_color_seed, const int face_sets_color_default, const struct CCGKey *key, const int update_flags) |
| void | GPU_pbvh_buffers_update_flush (GPU_PBVH_Buffers *buffers) |
| void | GPU_pbvh_buffers_free (GPU_PBVH_Buffers *buffers) |
| struct GPUBatch * | GPU_pbvh_buffers_batch_get (GPU_PBVH_Buffers *buffers, bool fast, bool wires) |
| short | GPU_pbvh_buffers_material_index_get (GPU_PBVH_Buffers *buffers) |
| bool | GPU_pbvh_buffers_has_overlays (GPU_PBVH_Buffers *buffers) |
| typedef struct GPU_PBVH_Buffers GPU_PBVH_Buffers |
Definition at line 1 of file GPU_buffers.h.
| anonymous enum |
| Enumerator | |
|---|---|
| GPU_PBVH_BUFFERS_SHOW_MASK | |
| GPU_PBVH_BUFFERS_SHOW_VCOL | |
| GPU_PBVH_BUFFERS_SHOW_SCULPT_FACE_SETS | |
Definition at line 72 of file GPU_buffers.h.
| GPU_PBVH_Buffers* GPU_pbvh_bmesh_buffers_build | ( | bool | smooth_shading | ) |
Definition at line 1052 of file gpu_buffers.c.
References MEM_callocN, GPU_PBVH_Buffers::show_overlay, GPU_PBVH_Buffers::smooth, and GPU_PBVH_Buffers::use_bmesh.
Referenced by pbvh_update_draw_buffer_cb().
| void GPU_pbvh_bmesh_buffers_update | ( | GPU_PBVH_Buffers * | buffers, |
| struct BMesh * | bm, | ||
| struct GSet * | bm_faces, | ||
| struct GSet * | bm_unique_verts, | ||
| struct GSet * | bm_other_verts, | ||
| const int | update_flags | ||
| ) |
Definition at line 884 of file gpu_buffers.c.
References BLI_assert, BLI_ghash_ensure_p(), BLI_ghash_free(), BLI_ghash_int_new_ex(), BLI_gset_len(), BLI_gsetIterator_getKey(), bm, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_face_as_array_vert_tri(), CD_PAINT_MASK, GPU_PBVH_Buffers::clear_bmesh_on_flush, CustomData_get_offset(), gpu_bmesh_face_visible_count(), gpu_bmesh_vert_to_buffer_copy(), gpu_bmesh_vert_visible_count(), GPU_indexbuf_add_line_verts(), GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_build_in_place(), GPU_indexbuf_init(), gpu_pbvh_batch_init(), GPU_PBVH_BUFFERS_SHOW_MASK, GPU_PBVH_BUFFERS_SHOW_VCOL, gpu_pbvh_vert_buf_data_set(), GPU_PRIM_LINES, GPU_PRIM_TRIS, GSET_ITER, GPU_PBVH_Buffers::index_buf, GPU_PBVH_Buffers::index_lines_buf, BMFace::len, BMFace::mat_nr, GPU_PBVH_Buffers::material_index, BMFace::no, NULL, POINTER_AS_UINT, POINTER_FROM_UINT, GPU_PBVH_Buffers::show_overlay, GPU_PBVH_Buffers::smooth, GPU_PBVH_Buffers::tot_tri, v, BMesh::vdata, and GPU_PBVH_Buffers::vert_buf.
Referenced by pbvh_update_draw_buffer_cb().
| void GPU_pbvh_bmesh_buffers_update_free | ( | GPU_PBVH_Buffers * | buffers | ) |
Definition at line 866 of file gpu_buffers.c.
References GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_PBVH_Buffers::index_buf, GPU_PBVH_Buffers::index_lines_buf, GPU_PBVH_Buffers::lines, GPU_PBVH_Buffers::smooth, and GPU_PBVH_Buffers::triangles.
Referenced by pbvh_update_draw_buffers().
| struct GPUBatch* GPU_pbvh_buffers_batch_get | ( | GPU_PBVH_Buffers * | buffers, |
| bool | fast, | ||
| bool | wires | ||
| ) |
Definition at line 1064 of file gpu_buffers.c.
References GPU_PBVH_Buffers::lines, GPU_PBVH_Buffers::lines_fast, GPU_PBVH_Buffers::triangles, and GPU_PBVH_Buffers::triangles_fast.
Referenced by sculpt_draw_cb().
| void GPU_pbvh_buffers_free | ( | GPU_PBVH_Buffers * | buffers | ) |
Definition at line 1110 of file gpu_buffers.c.
References gpu_pbvh_buffers_clear(), and MEM_freeN.
Referenced by BKE_pbvh_free(), pbvh_bmesh_node_split(), and pbvh_update_draw_buffers().
| bool GPU_pbvh_buffers_has_overlays | ( | GPU_PBVH_Buffers * | buffers | ) |
Definition at line 1073 of file gpu_buffers.c.
References GPU_PBVH_Buffers::show_overlay.
Referenced by sculpt_draw_cb().
| short GPU_pbvh_buffers_material_index_get | ( | GPU_PBVH_Buffers * | buffers | ) |
Definition at line 1078 of file gpu_buffers.c.
References GPU_PBVH_Buffers::material_index.
Referenced by sculpt_draw_cb().
| void GPU_pbvh_buffers_update_flush | ( | GPU_PBVH_Buffers * | buffers | ) |
Definition at line 1096 of file gpu_buffers.c.
References GPU_PBVH_Buffers::clear_bmesh_on_flush, gpu_pbvh_buffers_clear(), GPU_vertbuf_get_data(), GPU_vertbuf_use(), and GPU_PBVH_Buffers::vert_buf.
Referenced by pbvh_update_draw_buffers().
| GPU_PBVH_Buffers* GPU_pbvh_grid_buffers_build | ( | int | totgrid, |
| unsigned int ** | grid_hidden | ||
| ) |
Definition at line 768 of file gpu_buffers.c.
References GPU_PBVH_Buffers::grid_hidden, MEM_callocN, GPU_PBVH_Buffers::show_overlay, and GPU_PBVH_Buffers::totgrid.
Referenced by pbvh_update_draw_buffer_cb().
| void GPU_pbvh_grid_buffers_update | ( | GPU_PBVH_Buffers * | buffers, |
| struct SubdivCCG * | subdiv_ccg, | ||
| struct CCGElem ** | grids, | ||
| const struct DMFlagMat * | grid_flag_mats, | ||
| int * | grid_indices, | ||
| int | totgrid, | ||
| const int * | sculpt_face_sets, | ||
| const int | face_sets_color_seed, | ||
| const int | face_sets_color_default, | ||
| const struct CCGKey * | key, | ||
| const int | update_flags | ||
| ) |
Definition at line 588 of file gpu_buffers.c.
References abs(), BKE_paint_face_set_overlay_color_get(), BKE_pbvh_count_grid_quads(), BKE_subdiv_ccg_grid_to_face_index(), CCG_elem_co(), CCG_elem_mask(), CCG_elem_no(), CCG_grid_elem(), DMFlagMat::flag, fset, g_vbo_id, GPU_indexbuf_init(), gpu_pbvh_batch_init(), GPU_PBVH_BUFFERS_SHOW_MASK, GPU_PBVH_BUFFERS_SHOW_SCULPT_FACE_SETS, GPU_PBVH_BUFFERS_SHOW_VCOL, gpu_pbvh_grid_fill_index_buffers(), gpu_pbvh_vert_buf_data_set(), GPU_PRIM_LINES, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), CCGKey::grid_area, GPU_PBVH_Buffers::grid_flag_mats, GPU_PBVH_Buffers::grid_hidden, GPU_PBVH_Buffers::grid_indices, CCGKey::grid_size, GPU_PBVH_Buffers::gridkey, GPU_PBVH_Buffers::grids, CCGKey::has_mask, GPU_PBVH_Buffers::index_buf, GPU_PBVH_Buffers::index_lines_buf, DMFlagMat::mat_nr, GPU_PBVH_Buffers::material_index, ME_SMOOTH, normal_float_to_short_v3(), normal_quad_v3(), NULL, GPU_PBVH_Buffers::show_overlay, GPU_PBVH_Buffers::smooth, square_i(), GPU_PBVH_Buffers::totgrid, GPU_PBVH_Buffers::vert_buf, x, and y.
Referenced by pbvh_update_draw_buffer_cb().
| void GPU_pbvh_grid_buffers_update_free | ( | GPU_PBVH_Buffers * | buffers, |
| const struct DMFlagMat * | grid_flag_mats, | ||
| const int * | grid_indices | ||
| ) |
Definition at line 567 of file gpu_buffers.c.
References DMFlagMat::flag, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_PBVH_Buffers::index_buf, GPU_PBVH_Buffers::index_buf_fast, GPU_PBVH_Buffers::index_lines_buf, GPU_PBVH_Buffers::index_lines_buf_fast, GPU_PBVH_Buffers::lines, GPU_PBVH_Buffers::lines_fast, ME_SMOOTH, GPU_PBVH_Buffers::smooth, GPU_PBVH_Buffers::triangles, and GPU_PBVH_Buffers::triangles_fast.
Referenced by pbvh_update_draw_buffers().
| GPU_PBVH_Buffers* GPU_pbvh_mesh_buffers_build | ( | const struct MPoly * | mpoly, |
| const struct MLoop * | mloop, | ||
| const struct MLoopTri * | looptri, | ||
| const struct MVert * | mvert, | ||
| const int * | face_indices, | ||
| const int * | sculpt_face_sets, | ||
| const int | face_indices_len, | ||
| const struct Mesh * | mesh | ||
| ) |
Referenced by pbvh_update_draw_buffer_cb().
| void GPU_pbvh_mesh_buffers_update | ( | GPU_PBVH_Buffers * | buffers, |
| const struct MVert * | mvert, | ||
| const float * | vmask, | ||
| const struct MLoopCol * | vcol, | ||
| const int * | sculpt_face_sets, | ||
| const int | face_sets_color_seed, | ||
| const int | face_sets_color_default, | ||
| const struct MPropCol * | vtcol, | ||
| const int | update_flags | ||
| ) |
Referenced by pbvh_update_draw_buffer_cb().