Blender
V3.3
|
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_bitmap.h"
#include "BLI_ghash.h"
#include "BLI_math_color.h"
#include "BLI_utildefines.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_DerivedMesh.h"
#include "BKE_attribute.h"
#include "BKE_ccg.h"
#include "BKE_customdata.h"
#include "BKE_mesh.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_subdiv_ccg.h"
#include "GPU_batch.h"
#include "GPU_buffers.h"
#include "DRW_engine.h"
#include "gpu_private.h"
#include "bmesh.h"
Go to the source code of this file.
Classes | |
struct | GPU_PBVH_Buffers |
struct | GPUAttrRef |
struct | PBVHGPUFormat |
Macros | |
#define | MAX_GPU_ATTR 256 |
Typedefs | |
typedef struct GPUAttrRef | GPUAttrRef |
typedef struct PBVHGPUFormat | PBVHGPUFormat |
Functions | |
PBVHGPUFormat * | GPU_pbvh_make_format (void) |
void | GPU_pbvh_free_format (PBVHGPUFormat *vbo_id) |
Generic | |
static int | gpu_pbvh_make_attr_offs (eAttrDomainMask domain_mask, eCustomDataMask type_mask, const CustomData *vdata, const CustomData *edata, const CustomData *ldata, const CustomData *pdata, GPUAttrRef r_cd_attrs[MAX_GPU_ATTR], bool active_only, int active_type, int active_domain, const CustomDataLayer *active_layer, const CustomDataLayer *render_layer) |
GPU_PBVH_Buffers * | GPU_pbvh_bmesh_buffers_build (bool smooth_shading) |
static bool | gpu_pbvh_format_equals (PBVHGPUFormat *a, PBVHGPUFormat *b) |
bool | GPU_pbvh_attribute_names_update (PBVHType pbvh_type, PBVHGPUFormat *vbo_id, const CustomData *vdata, const CustomData *ldata, bool active_attrs_only) |
GPUBatch * | GPU_pbvh_buffers_batch_get (GPU_PBVH_Buffers *buffers, bool fast, bool wires) |
bool | GPU_pbvh_buffers_has_overlays (GPU_PBVH_Buffers *buffers) |
short | GPU_pbvh_buffers_material_index_get (GPU_PBVH_Buffers *buffers) |
static void | gpu_pbvh_buffers_clear (GPU_PBVH_Buffers *buffers) |
void | GPU_pbvh_buffers_update_flush (GPU_PBVH_Buffers *buffers) |
void | GPU_pbvh_buffers_free (GPU_PBVH_Buffers *buffers) |
PBVH Utils | |
void | gpu_pbvh_init () |
void | gpu_pbvh_exit () |
static CustomDataLayer * | get_active_layer (const CustomData *cdata, int type) |
static CustomDataLayer * | get_render_layer (const CustomData *cdata, int type) |
static bool | gpu_pbvh_vert_buf_data_set (PBVHGPUFormat *vbo_id, GPU_PBVH_Buffers *buffers, uint vert_len) |
static void | gpu_pbvh_batch_init (GPU_PBVH_Buffers *buffers, GPUPrimType prim) |
Mesh PBVH | |
static bool | gpu_pbvh_is_looptri_visible (const MLoopTri *lt, const MVert *mvert, const MLoop *mloop, const int *sculpt_face_sets) |
void | GPU_pbvh_mesh_buffers_update (PBVHGPUFormat *vbo_id, GPU_PBVH_Buffers *buffers, const MVert *mvert, const CustomData *vdata, const CustomData *ldata, const float *vmask, const int *sculpt_face_sets, int face_sets_color_seed, int face_sets_color_default, int update_flags, const float(*vert_normals)[3]) |
GPU_PBVH_Buffers * | GPU_pbvh_mesh_buffers_build (const MPoly *mpoly, const MLoop *mloop, const MLoopTri *looptri, const MVert *mvert, const int *face_indices, const int *sculpt_face_sets, const int face_indices_len, const struct Mesh *mesh) |
Grid PBVH | |
static void | gpu_pbvh_grid_fill_index_buffers (GPU_PBVH_Buffers *buffers, SubdivCCG *UNUSED(subdiv_ccg), const int *UNUSED(face_sets), const int *grid_indices, uint visible_quad_len, int totgrid, int gridsize) |
void | GPU_pbvh_grid_buffers_update_free (GPU_PBVH_Buffers *buffers, const struct DMFlagMat *grid_flag_mats, const int *grid_indices) |
void | GPU_pbvh_grid_buffers_update (PBVHGPUFormat *vbo_id, GPU_PBVH_Buffers *buffers, SubdivCCG *subdiv_ccg, 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) |
GPU_PBVH_Buffers * | GPU_pbvh_grid_buffers_build (int totgrid, BLI_bitmap **grid_hidden, bool smooth) |
BMesh PBVH | |
static void | gpu_bmesh_vert_to_buffer_copy (PBVHGPUFormat *vbo_id, BMVert *v, GPUVertBuf *vert_buf, int v_index, const float fno[3], const float *fmask, const int cd_vert_mask_offset, const bool show_mask, const bool show_vcol, bool *empty_mask) |
static int | gpu_bmesh_vert_visible_count (GSet *bm_unique_verts, GSet *bm_other_verts) |
static int | gpu_bmesh_face_visible_count (GSet *bm_faces) |
void | GPU_pbvh_bmesh_buffers_update_free (GPU_PBVH_Buffers *buffers) |
void | GPU_pbvh_bmesh_buffers_update (PBVHGPUFormat *vbo_id, GPU_PBVH_Buffers *buffers, BMesh *bm, GSet *bm_faces, GSet *bm_unique_verts, GSet *bm_other_verts, const int update_flags) |
Mesh drawing using OpenGL VBO (Vertex Buffer Objects)
Definition in file gpu_buffers.c.
#define MAX_GPU_ATTR 256 |
Definition at line 90 of file gpu_buffers.c.
typedef struct GPUAttrRef GPUAttrRef |
typedef struct PBVHGPUFormat PBVHGPUFormat |
|
static |
Definition at line 146 of file gpu_buffers.c.
References CustomData_get_active_layer_index(), CustomData::layers, NULL, and type.
Referenced by GPU_pbvh_attribute_names_update(), and GPU_pbvh_mesh_buffers_update().
|
static |
Definition at line 152 of file gpu_buffers.c.
References CustomData_get_render_layer_index(), CustomData::layers, NULL, and type.
Referenced by GPU_pbvh_attribute_names_update(), and GPU_pbvh_mesh_buffers_update().
|
static |
Definition at line 968 of file gpu_buffers.c.
References BLI_gsetIterator_getKey(), BM_elem_flag_test, BM_ELEM_HIDDEN, and GSET_ITER.
Referenced by GPU_pbvh_bmesh_buffers_update().
|
static |
Definition at line 907 of file gpu_buffers.c.
References BLI_assert, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, BMVert::co, PBVHGPUFormat::col, PBVHGPUFormat::fset, GPU_vertbuf_attr_set(), PBVHGPUFormat::msk, BMVert::no, PBVHGPUFormat::nor, normal_float_to_short_v3(), PBVHGPUFormat::pos, and v.
Referenced by GPU_pbvh_bmesh_buffers_update().
Definition at line 946 of file gpu_buffers.c.
References BLI_gsetIterator_getKey(), BM_elem_flag_test, BM_ELEM_HIDDEN, GSET_ITER, and v.
Referenced by GPU_pbvh_bmesh_buffers_update().
bool GPU_pbvh_attribute_names_update | ( | PBVHType | pbvh_type, |
PBVHGPUFormat * | vbo_id, | ||
const CustomData * | vdata, | ||
const CustomData * | ldata, | ||
bool | active_attrs_only | ||
) |
Definition at line 1291 of file gpu_buffers.c.
References blender::compositor::active, PBVHGPUFormat::active_attrs_only, ATTR_DOMAIN_CORNER, ATTR_DOMAIN_MASK_COLOR, ATTR_DOMAIN_MASK_CORNER, ATTR_DOMAIN_NUM, ATTR_DOMAIN_POINT, GPUVertFormat::attr_len, BKE_id_attribute_copy_domains_temp(), BKE_id_attribute_domain(), BKE_id_attributes_active_color_get(), BKE_id_attributes_render_color_get(), CD_MASK_COLOR_ALL, CD_MASK_MLOOPUV, CD_MLOOPUV, PBVHGPUFormat::col, CustomData_get_active_layer_index(), CustomData_has_layer(), GPUAttrRef::domain, DRW_cdlayer_attr_aliases_add(), PBVHGPUFormat::format, PBVHGPUFormat::fset, get_active_layer(), get_render_layer(), GPU_COMP_F32, GPU_COMP_I16, GPU_COMP_U16, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, gpu_pbvh_format_equals(), gpu_pbvh_make_attr_offs(), GPU_vertformat_alias_add(), GPU_vertformat_attr_add(), GPU_vertformat_clear(), Mesh::id, ID_ME, GPUAttrRef::layer_idx, CustomData::layers, MAX_GPU_ATTR, PBVHGPUFormat::msk, PBVHGPUFormat::nor, NULL, PBVH_FACES, PBVHGPUFormat::pos, PBVHGPUFormat::totcol, PBVHGPUFormat::totuv, CustomDataLayer::type, and PBVHGPUFormat::uv.
Referenced by GPU_pbvh_make_format().
|
static |
Definition at line 181 of file gpu_buffers.c.
References GPU_batch_create, GPU_PRIM_LINES, 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, NULL, GPU_PBVH_Buffers::triangles, GPU_PBVH_Buffers::triangles_fast, and GPU_PBVH_Buffers::vert_buf.
Referenced by GPU_pbvh_bmesh_buffers_update(), GPU_pbvh_grid_buffers_update(), and GPU_pbvh_mesh_buffers_update().
GPU_PBVH_Buffers* GPU_pbvh_bmesh_buffers_build | ( | bool | smooth_shading | ) |
Threaded: do not call any functions that use OpenGL calls!
Definition at line 1169 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 | ( | PBVHGPUFormat * | vbo_id, |
struct 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 | ||
) |
Creates a vertex buffer (coordinate, normal, color) and, if smooth shading, an element index buffer. Threaded: do not call any functions that use OpenGL calls!
Definition at line 999 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 | ) |
Free part of data for update. Not thread safe, must run in OpenGL main thread.
Definition at line 984 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().
GPUBatch* GPU_pbvh_buffers_batch_get | ( | GPU_PBVH_Buffers * | buffers, |
bool | fast, | ||
bool | wires | ||
) |
Draw.
Definition at line 1425 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().
|
static |
Definition at line 1444 of file gpu_buffers.c.
References GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_VERTBUF_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, GPU_PBVH_Buffers::triangles, GPU_PBVH_Buffers::triangles_fast, and GPU_PBVH_Buffers::vert_buf.
Referenced by GPU_pbvh_buffers_free(), and GPU_pbvh_buffers_update_flush().
void GPU_pbvh_buffers_free | ( | GPU_PBVH_Buffers * | buffers | ) |
Free buffers. Not thread safe, must run in OpenGL main thread.
Definition at line 1471 of file gpu_buffers.c.
References gpu_pbvh_buffers_clear(), and MEM_freeN.
Referenced by BKE_pbvh_free(), and pbvh_free_draw_buffers().
bool GPU_pbvh_buffers_has_overlays | ( | GPU_PBVH_Buffers * | buffers | ) |
Definition at line 1434 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 1439 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 | ) |
Finish update. Not thread safe, must run in OpenGL main thread.
Definition at line 1457 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().
Definition at line 141 of file gpu_buffers.c.
Referenced by GPU_exit().
|
static |
Definition at line 1266 of file gpu_buffers.c.
References Freestyle::a, usdtokens::b(), and MIN2.
Referenced by GPU_pbvh_attribute_names_update().
void GPU_pbvh_free_format | ( | PBVHGPUFormat * | vbo_id | ) |
Definition at line 113 of file gpu_buffers.c.
References MEM_SAFE_FREE.
Referenced by BKE_pbvh_free().
GPU_PBVH_Buffers* GPU_pbvh_grid_buffers_build | ( | int | totgrid, |
unsigned int ** | grid_hidden, | ||
bool | smooth | ||
) |
Threaded: do not call any functions that use OpenGL calls!
Definition at line 884 of file gpu_buffers.c.
References GPU_PBVH_Buffers::grid_hidden, MEM_callocN, GPU_PBVH_Buffers::show_overlay, smooth(), GPU_PBVH_Buffers::smooth, and GPU_PBVH_Buffers::totgrid.
Referenced by pbvh_update_draw_buffer_cb().
void GPU_pbvh_grid_buffers_update | ( | PBVHGPUFormat * | vbo_id, |
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, | ||
int | face_sets_color_seed, | ||
int | face_sets_color_default, | ||
const struct CCGKey * | key, | ||
int | update_flags | ||
) |
Threaded: do not call any functions that use OpenGL calls!
Definition at line 706 of file gpu_buffers.c.
References blender::math::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(), PBVHGPUFormat::col, PBVHGPUFormat::fset, 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, PBVHGPUFormat::msk, PBVHGPUFormat::nor, normal_float_to_short_v3(), normal_quad_v3(), NULL, PBVHGPUFormat::pos, 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 686 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, smooth(), GPU_PBVH_Buffers::smooth, GPU_PBVH_Buffers::triangles, and GPU_PBVH_Buffers::triangles_fast.
Referenced by pbvh_update_draw_buffers().
|
static |
Definition at line 554 of file gpu_buffers.c.
References GPU_indexbuf_add_line_verts(), GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_LINES, GPU_PRIM_TRIS, GPU_PBVH_Buffers::grid_hidden, GPU_PBVH_Buffers::index_buf, GPU_PBVH_Buffers::index_buf_fast, GPU_PBVH_Buffers::index_lines_buf, GPU_PBVH_Buffers::index_lines_buf_fast, offset, paint_is_grid_face_hidden(), GPU_PBVH_Buffers::smooth, square_uint(), v1, and v2.
Referenced by GPU_pbvh_grid_buffers_update().
Definition at line 137 of file gpu_buffers.c.
Referenced by GPU_init().
|
static |
Definition at line 213 of file gpu_buffers.c.
References paint_is_face_hidden(), MLoopTri::poly, and SCULPT_FACE_SET_NONE.
Referenced by GPU_pbvh_mesh_buffers_build(), and GPU_pbvh_mesh_buffers_update().
|
static |
Builds a list of attributes from a set of domains and a set of customdata types.
active_only | Returns only one item, a GPUAttrRef to active_layer. |
active_layer | CustomDataLayer to use for the active layer. |
active_layer | CustomDataLayer to use for the render layer. |
Definition at line 1189 of file gpu_buffers.c.
References ATTR_DOMAIN_POINT, CD_FLAG_TEMPORARY, GPUAttrRef::cd_offset, CD_TYPE_AS_MASK, count, GPUAttrRef::domain, CustomDataLayer::flag, GPUAttrRef::layer_idx, CustomData::layers, MAX_GPU_ATTR, CustomDataLayer::offset, SWAP, CustomData::totlayer, GPUAttrRef::type, and CustomDataLayer::type.
Referenced by GPU_pbvh_attribute_names_update(), and GPU_pbvh_mesh_buffers_update().
PBVHGPUFormat* GPU_pbvh_make_format | ( | void | ) |
Definition at line 104 of file gpu_buffers.c.
References GPU_pbvh_attribute_names_update(), MEM_callocN, NULL, and PBVH_FACES.
Referenced by pbvh_check_draw_layout(), and pbvh_update_draw_buffers().
GPU_PBVH_Buffers* GPU_pbvh_mesh_buffers_build | ( | const MPoly * | mpoly, |
const MLoop * | mloop, | ||
const MLoopTri * | looptri, | ||
const MVert * | mvert, | ||
const int * | face_indices, | ||
const int * | sculpt_face_sets, | ||
const int | face_indices_len, | ||
const struct Mesh * | mesh | ||
) |
Definition at line 460 of file gpu_buffers.c.
References BKE_mesh_looptri_get_real_edges(), GPU_PBVH_Buffers::face_indices, GPU_PBVH_Buffers::face_indices_len, MPoly::flag, GPU_indexbuf_add_line_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), gpu_pbvh_is_looptri_visible(), GPU_PRIM_LINES, GPU_PBVH_Buffers::index_lines_buf, GPU_PBVH_Buffers::looptri, ME_SMOOTH, MEM_callocN, mesh, GPU_PBVH_Buffers::mloop, GPU_PBVH_Buffers::mpoly, MLoopTri::poly, GPU_PBVH_Buffers::show_overlay, GPU_PBVH_Buffers::smooth, and GPU_PBVH_Buffers::tot_tri.
void GPU_pbvh_mesh_buffers_update | ( | PBVHGPUFormat * | vbo_id, |
GPU_PBVH_Buffers * | buffers, | ||
const MVert * | mvert, | ||
const CustomData * | vdata, | ||
const CustomData * | ldata, | ||
const float * | vmask, | ||
const int * | sculpt_face_sets, | ||
int | face_sets_color_seed, | ||
int | face_sets_color_default, | ||
int | update_flags, | ||
const float(*) | vert_normals[3] | ||
) |
Definition at line 222 of file gpu_buffers.c.
References MLoopCol::a, blender::math::abs(), PBVHGPUFormat::active_attrs_only, ATTR_DOMAIN_AUTO, ATTR_DOMAIN_CORNER, ATTR_DOMAIN_MASK_COLOR, ATTR_DOMAIN_MASK_CORNER, ATTR_DOMAIN_POINT, MLoopCol::b, BKE_id_attribute_copy_domains_temp(), BKE_id_attribute_domain(), BKE_id_attributes_active_color_get(), BKE_id_attributes_render_color_get(), BKE_mesh_calc_poly_normal(), BKE_paint_face_set_overlay_color_get(), BLI_color_from_srgb_table, CD_MASK_COLOR_ALL, CD_MASK_MLOOPUV, CD_MLOOPUV, CD_PROP_COLOR, BMVert::co, PBVHGPUFormat::col, MPropCol::color, copy_v3_v3(), copy_v3_v3_short(), CustomDataLayer::data, GPUAttrRef::domain, GPU_PBVH_Buffers::face_indices, GPU_PBVH_Buffers::face_indices_len, PBVHGPUFormat::fset, MLoopCol::g, get_active_layer(), get_render_layer(), gpu_pbvh_batch_init(), GPU_PBVH_BUFFERS_SHOW_MASK, GPU_PBVH_BUFFERS_SHOW_SCULPT_FACE_SETS, GPU_PBVH_BUFFERS_SHOW_VCOL, gpu_pbvh_is_looptri_visible(), gpu_pbvh_make_attr_offs(), gpu_pbvh_vert_buf_data_set(), GPU_PRIM_TRIS, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_raw_step(), Mesh::id, ID_ME, GPUAttrRef::layer_idx, CustomData::layers, MPoly::loopstart, GPU_PBVH_Buffers::looptri, MPoly::mat_nr, GPU_PBVH_Buffers::material_index, MAX_GPU_ATTR, GPU_PBVH_Buffers::mloop, GPU_PBVH_Buffers::mpoly, PBVHGPUFormat::msk, GPU_PBVH_Buffers::mvert, PBVHGPUFormat::nor, normal_float_to_short_v3(), NULL, MLoopTri::poly, PBVHGPUFormat::pos, MLoopCol::r, GPU_PBVH_Buffers::show_overlay, GPU_PBVH_Buffers::smooth, GPU_PBVH_Buffers::tot_tri, MLoopTri::tri, CustomDataLayer::type, UINT_MAX, unit_float_to_ushort_clamp(), MLoopUV::uv, PBVHGPUFormat::uv, v, MLoop::v, and GPU_PBVH_Buffers::vert_buf.
|
static |
Definition at line 160 of file gpu_buffers.c.
References PBVHGPUFormat::format, GPU_USAGE_STATIC, GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_get_data(), GPU_vertbuf_get_vertex_len(), NULL, and GPU_PBVH_Buffers::vert_buf.
Referenced by GPU_pbvh_bmesh_buffers_update(), GPU_pbvh_grid_buffers_update(), and GPU_pbvh_mesh_buffers_update().