20 if (
format.attr_len == 0) {
29 if (
format.attr_len == 0) {
43 for (const int face : range) {
44 const Span<int> face_verts = corner_verts.slice(faces[face]);
45 const int *vert = std::find_if(face_verts.begin(), face_verts.end(), [&](const int vert) {
46 return facedot_tags[vert].test();
48 if (vert == face_verts.end()) {
49 vbo_data[face] = float3(0);
52 vbo_data[face] = positions[*vert];
59 for (const int face : range) {
60 vbo_data[face] = bke::mesh::face_center_calc(positions, corner_verts.slice(faces[face]));
70 for (const int face_index : range) {
71 const BMFace &face = *BM_face_at_index(&const_cast<BMesh &>(bm), face_index);
72 if (mr.bm_vert_coords.is_empty()) {
73 BM_face_calc_center_median(&face, vbo_data[face_index]);
76 BM_face_calc_center_median_vcos(&bm, &face, vbo_data[face_index], mr.bm_vert_coords);
void GPU_indexbuf_init_build_on_device(blender::gpu::IndexBuf *elem, uint index_len)
void GPU_vertbuf_init_build_on_device(blender::gpu::VertBuf &verts, const GPUVertFormat &format, uint v_len)
#define GPU_vertbuf_init_with_format(verts, format)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
ATTR_WARN_UNUSED_RESULT BMesh * bm
static const GPUVertFormat & get_fdots_pos_format()
static const GPUVertFormat & get_fdots_nor_format_subdiv()
void draw_subdiv_build_fdots_buffers(const DRWSubdivCache &cache, gpu::VertBuf *fdots_pos, gpu::VertBuf *fdots_nor, gpu::IndexBuf *fdots_indices)
void extract_face_dots_position(const MeshRenderData &mr, gpu::VertBuf &vbo)
static void extract_face_dot_positions_bm(const MeshRenderData &mr, MutableSpan< float3 > vbo_data)
static void extract_face_dot_positions_mesh(const MeshRenderData &mr, MutableSpan< float3 > vbo_data)
void extract_face_dots_subdiv(const DRWSubdivCache &subdiv_cache, gpu::VertBuf &fdots_pos, gpu::VertBuf *fdots_nor, gpu::IndexBuf &fdots)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
MeshRuntimeHandle * runtime
Span< float3 > vert_positions
eMRExtractType extract_type
OffsetIndices< int > faces