Blender  V2.93
Functions
draw_cache_impl_mesh.c File Reference

Mesh API for render engines. More...

#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_bitmap.h"
#include "BLI_buffer.h"
#include "BLI_edgehash.h"
#include "BLI_listbase.h"
#include "BLI_math_bits.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_editmesh_cache.h"
#include "BKE_editmesh_tangent.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_tangent.h"
#include "BKE_modifier.h"
#include "BKE_object_deform.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "atomic_ops.h"
#include "bmesh.h"
#include "GPU_batch.h"
#include "GPU_material.h"
#include "DRW_render.h"
#include "ED_mesh.h"
#include "ED_uvedit.h"
#include "draw_cache_extract.h"
#include "draw_cache_inline.h"
#include "draw_cache_impl.h"

Go to the source code of this file.

Functions

BLI_INLINE bool mesh_cd_layers_type_overlap (DRW_MeshCDMask a, DRW_MeshCDMask b)
 
BLI_INLINE bool mesh_cd_layers_type_equal (DRW_MeshCDMask a, DRW_MeshCDMask b)
 
BLI_INLINE void mesh_cd_layers_type_merge (DRW_MeshCDMask *a, DRW_MeshCDMask b)
 
BLI_INLINE void mesh_cd_layers_type_clear (DRW_MeshCDMask *a)
 
BLI_INLINE const Mesheditmesh_final_or_this (const Mesh *me)
 
static void mesh_cd_calc_edit_uv_layer (const Mesh *UNUSED(me), DRW_MeshCDMask *cd_used)
 
BLI_INLINE const CustomDatamesh_cd_ldata_get_from_mesh (const Mesh *me)
 
BLI_INLINE const CustomDatamesh_cd_vdata_get_from_mesh (const Mesh *me)
 
static void mesh_cd_calc_active_uv_layer (const Mesh *me, DRW_MeshCDMask *cd_used)
 
static void mesh_cd_calc_active_mask_uv_layer (const Mesh *me, DRW_MeshCDMask *cd_used)
 
static void mesh_cd_calc_active_vcol_layer (const Mesh *me, DRW_MeshCDMask *cd_used)
 
static void mesh_cd_calc_active_mloopcol_layer (const Mesh *me, DRW_MeshCDMask *cd_used)
 
static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers (const Mesh *me, struct GPUMaterial **gpumat_array, int gpumat_array_len)
 
Mesh GPUBatch Cache
static void mesh_batch_cache_clear (Mesh *me)
 
BLI_INLINE void mesh_batch_cache_add_request (MeshBatchCache *cache, DRWBatchFlag new_flag)
 
static bool mesh_batch_cache_valid (Mesh *me)
 
static void mesh_batch_cache_init (Mesh *me)
 
void DRW_mesh_batch_cache_validate (Mesh *me)
 
static MeshBatchCachemesh_batch_cache_get (Mesh *me)
 
static void mesh_batch_cache_check_vertex_group (MeshBatchCache *cache, const struct DRW_MeshWeightState *wstate)
 
static void mesh_batch_cache_request_surface_batches (MeshBatchCache *cache)
 
static void mesh_batch_cache_discard_surface_batches (MeshBatchCache *cache)
 
static void mesh_batch_cache_discard_shaded_tri (MeshBatchCache *cache)
 
static void mesh_batch_cache_discard_uvedit (MeshBatchCache *cache)
 
static void mesh_batch_cache_discard_uvedit_select (MeshBatchCache *cache)
 
void DRW_mesh_batch_cache_dirty_tag (Mesh *me, eMeshBatchDirtyMode mode)
 
void DRW_mesh_batch_cache_free (Mesh *me)
 
Vertex Group Selection
static void drw_mesh_weight_state_clear (struct DRW_MeshWeightState *wstate)
 
static void drw_mesh_weight_state_copy (struct DRW_MeshWeightState *wstate_dst, const struct DRW_MeshWeightState *wstate_src)
 
static bool drw_mesh_flags_equal (const bool *array1, const bool *array2, int size)
 
static bool drw_mesh_weight_state_compare (const struct DRW_MeshWeightState *a, const struct DRW_MeshWeightState *b)
 
static void drw_mesh_weight_state_extract (Object *ob, Mesh *me, const ToolSettings *ts, bool paint_mode, struct DRW_MeshWeightState *wstate)
 
Public API
static void texpaint_request_active_uv (MeshBatchCache *cache, Mesh *me)
 
static void texpaint_request_active_vcol (MeshBatchCache *cache, Mesh *me)
 
static void sculpt_request_active_vcol (MeshBatchCache *cache, Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_all_verts (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_all_edges (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_surface (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_loose_edges (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_surface_weights (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edge_detection (Mesh *me, bool *r_is_manifold)
 
GPUBatchDRW_mesh_batch_cache_get_wireframes_face (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_mesh_analysis (Mesh *me)
 
GPUBatch ** DRW_mesh_batch_cache_get_surface_shaded (Mesh *me, struct GPUMaterial **gpumat_array, uint gpumat_array_len)
 
GPUBatch ** DRW_mesh_batch_cache_get_surface_texpaint (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_surface_texpaint_single (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_surface_vertpaint (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_surface_sculpt (Mesh *me)
 
int DRW_mesh_material_count_get (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_sculpt_overlays (Mesh *me)
 
Edit Mode API
GPUVertBufDRW_mesh_batch_cache_pos_vertbuf_get (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_triangles (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_edges (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_vertices (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_vnors (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_lnors (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_facedots (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edit_skin_roots (Mesh *me)
 
Edit Mode selection API
GPUBatchDRW_mesh_batch_cache_get_triangles_with_select_id (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_facedots_with_select_id (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edges_with_select_id (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_verts_with_select_id (Mesh *me)
 
UV Image editor API
static void edituv_request_active_uv (MeshBatchCache *cache, Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edituv_faces_stretch_area (Mesh *me, float **tot_area, float **tot_uv_area)
 
GPUBatchDRW_mesh_batch_cache_get_edituv_faces_stretch_angle (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edituv_faces (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edituv_edges (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edituv_verts (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_edituv_facedots (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_uv_edges (Mesh *me)
 
GPUBatchDRW_mesh_batch_cache_get_surface_edges (Mesh *me)
 
Grouped batch generation
void DRW_mesh_batch_cache_free_old (Mesh *me, int ctime)
 
void DRW_mesh_batch_cache_create_requested (struct TaskGraph *task_graph, Object *ob, Mesh *me, const Scene *scene, const bool is_paint_mode, const bool use_hide)
 

Detailed Description

Mesh API for render engines.

Definition in file draw_cache_impl_mesh.c.

Function Documentation

◆ DRW_mesh_batch_cache_create_requested()

void DRW_mesh_batch_cache_create_requested ( struct TaskGraph task_graph,
Object ob,
Mesh me,
const Scene scene,
const bool  is_paint_mode,
const bool  use_hide 
)

TODO: The code and data structure is ready to support modified UV display but the selection code for UVs needs to support it first. So for now, only display the cage in all cases.

Definition at line 1188 of file draw_cache_impl_mesh.c.

References MeshBatchCache::all_edges, MeshBatchCache::all_verts, MeshBatchCache::batch, MeshBatchCache::batch_ready, MeshBatchCache::batch_requested, BKE_modifiers_uses_subsurf_facedots(), BKE_pbvh_update_normals(), BLI_assert, BLI_task_graph_work_and_wait(), MeshBatchCache::cage, MeshBatchCache::cd_needed, CD_ORCO, MeshBatchCache::cd_used, MeshBatchCache::cd_used_over_time, CustomData_get_layer(), Object::data, DRW_batch_requested(), DRW_ibo_request(), drw_mesh_weight_state_clear(), drw_mesh_weight_state_copy(), drw_mesh_weight_state_extract(), DRW_object_is_in_edit_mode(), DRW_vbo_request(), MeshBatchCache::edge_detection, MeshBufferCache::edge_fac, MeshBufferCache::edge_idx, MeshBufferCache::edit_data, MeshBatchCache::edit_edges, MeshBatchCache::edit_fdots, MeshBatchCache::edit_lnor, Mesh::edit_mesh, MeshBatchCache::edit_mesh_analysis, MeshBatchCache::edit_selection_edges, MeshBatchCache::edit_selection_faces, MeshBatchCache::edit_selection_fdots, MeshBatchCache::edit_selection_verts, MeshBatchCache::edit_skin_roots, MeshBatchCache::edit_triangles, MeshBatchCache::edit_vertices, MeshBatchCache::edit_vnor, MeshBufferCache::edituv_data, MeshBatchCache::edituv_edges, MeshBatchCache::edituv_faces, MeshBatchCache::edituv_faces_stretch_angle, MeshBatchCache::edituv_faces_stretch_area, MeshBufferCache::edituv_fdots, MeshBatchCache::edituv_fdots, MeshBufferCache::edituv_lines, MeshBufferCache::edituv_points, MeshBufferCache::edituv_stretch_angle, MeshBufferCache::edituv_stretch_area, MeshBufferCache::edituv_tris, MeshBatchCache::edituv_verts, MeshBufferCache::fdot_idx, MeshBufferCache::fdots, MeshBufferCache::fdots_edituv_data, MeshBufferCache::fdots_nor, MeshBufferCache::fdots_pos, MeshBufferCache::fdots_uv, MeshBatchCache::final, FOREACH_MESH_BUFFER_CACHE, GPU_BATCH_CLEAR_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_PRIM_LINES, GPU_PRIM_LINES_ADJ, GPU_PRIM_POINTS, GPU_PRIM_TRIS, GPU_VERTBUF_DISCARD_SAFE, MeshBufferCache::ibo, if(), Mesh_Runtime::is_original, MeshBatchCache::is_uvsyncsel, MeshBufferCache::lines, MeshBufferCache::lines_adjacency, MeshBufferCache::lines_loose, MeshBufferCache::lines_paint_mask, MeshBufferCache::lnor, MeshBatchCache::loose_edges, MeshBatchCache::mat_len, MBC_EDITUV, MBC_EDITUV_EDGES, MBC_EDITUV_FACES, MBC_EDITUV_FACES_STRETCH_ANGLE, MBC_EDITUV_FACES_STRETCH_AREA, MBC_EDITUV_VERTS, MBC_SURFACE, MBC_SURFACE_WEIGHTS, MBC_WIRE_LOOPS_UVS, mesh, MeshBufferCache::mesh_analysis, mesh_batch_cache_check_vertex_group(), mesh_batch_cache_get(), mesh_buffer_cache_create_requested(), mesh_cd_layers_type_clear(), mesh_cd_layers_type_merge(), mesh_cd_layers_type_overlap(), BMEditMesh::mesh_eval_cage, BMEditMesh::mesh_eval_final, Object::mode, NULL, OB_MESH, OB_MODE_EDIT, Object::obmat, DRW_MeshCDMask::orco, MeshBufferCache::orco, SculptSession::pbvh, MeshBufferCache::points, MeshBufferCache::poly_idx, MeshBufferCache::pos_nor, Mesh::runtime, scene, Object::sculpt, MeshBufferCache::sculpt_data, DRW_MeshCDMask::sculpt_overlays, MeshBatchCache::sculpt_overlays, DRW_MeshCDMask::sculpt_vcol, MeshBufferCache::skin_roots, Mesh_Runtime::subdiv_ccg, MeshBatchCache::surface, MeshBatchCache::surface_per_mat, MeshBatchCache::surface_weights, DRW_MeshCDMask::tan, MeshBufferCache::tan, DRW_MeshCDMask::tan_orco, Scene::toolsettings, MeshBufferCache::tris, MeshBufferCache::tris_per_mat, Object::type, DRW_MeshCDMask::uv, MeshBufferCache::uv, MeshBatchCache::uv_cage, ToolSettings::uv_flag, UV_SYNC_SELECTION, MeshBufferCache::vbo, DRW_MeshCDMask::vcol, MeshBufferCache::vcol, MeshBufferCache::vert_idx, MeshBatchCache::weight_state, MeshBufferCache::weights, MeshBatchCache::wire_edges, MeshBatchCache::wire_loops, and MeshBatchCache::wire_loops_uvs.

◆ DRW_mesh_batch_cache_dirty_tag()

void DRW_mesh_batch_cache_dirty_tag ( Mesh me,
eMeshBatchDirtyMode  mode 
)

Definition at line 631 of file draw_cache_impl_mesh.c.

References MeshBatchCache::all_edges, MeshBatchCache::all_verts, MeshBatchCache::batch, Mesh_Runtime::batch_cache, MeshBatchCache::batch_ready, BKE_MESH_BATCH_DIRTY_ALL, BKE_MESH_BATCH_DIRTY_SELECT, BKE_MESH_BATCH_DIRTY_SELECT_PAINT, BKE_MESH_BATCH_DIRTY_SHADING, BKE_MESH_BATCH_DIRTY_UVEDIT_ALL, BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT, BLI_assert, MeshBatchCache::edge_detection, MeshBatchCache::edit_edges, MeshBatchCache::edit_fdots, MeshBatchCache::edit_lnor, MeshBatchCache::edit_mesh_analysis, MeshBatchCache::edit_selection_edges, MeshBatchCache::edit_selection_faces, MeshBatchCache::edit_selection_fdots, MeshBatchCache::edit_selection_verts, MeshBatchCache::edit_triangles, MeshBatchCache::edit_vertices, MeshBatchCache::edituv_edges, MeshBatchCache::edituv_faces, MeshBatchCache::edituv_faces_stretch_angle, MeshBatchCache::edituv_faces_stretch_area, MeshBatchCache::edituv_fdots, MeshBatchCache::edituv_verts, FOREACH_MESH_BUFFER_CACHE, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, MeshBatchCache::is_dirty, MeshBatchCache::loose_edges, MBC_EDIT_EDGES, MBC_EDIT_FACEDOTS, MBC_EDIT_MESH_ANALYSIS, MBC_EDIT_SELECTION_EDGES, MBC_EDIT_SELECTION_FACEDOTS, MBC_EDIT_SELECTION_FACES, MBC_EDIT_SELECTION_VERTS, MBC_EDIT_TRIANGLES, MBC_EDIT_VERTICES, MBC_EDITUV, MBC_SURFACE, MBC_WIRE_EDGES, MBC_WIRE_LOOPS, mesh_batch_cache_discard_shaded_tri(), mesh_batch_cache_discard_surface_batches(), mesh_batch_cache_discard_uvedit(), mesh_batch_cache_discard_uvedit_select(), NULL, Mesh::runtime, MeshBatchCache::surface, MeshBatchCache::surface_weights, MeshBatchCache::wire_edges, and MeshBatchCache::wire_loops.

Referenced by DRW_engines_register().

◆ DRW_mesh_batch_cache_free()

void DRW_mesh_batch_cache_free ( Mesh me)

◆ DRW_mesh_batch_cache_free_old()

void DRW_mesh_batch_cache_free_old ( Mesh me,
int  ctime 
)

◆ DRW_mesh_batch_cache_get_all_edges()

GPUBatch* DRW_mesh_batch_cache_get_all_edges ( Mesh me)

◆ DRW_mesh_batch_cache_get_all_verts()

GPUBatch* DRW_mesh_batch_cache_get_all_verts ( Mesh me)

◆ DRW_mesh_batch_cache_get_edge_detection()

GPUBatch* DRW_mesh_batch_cache_get_edge_detection ( Mesh me,
bool *  r_is_manifold 
)

◆ DRW_mesh_batch_cache_get_edges_with_select_id()

GPUBatch* DRW_mesh_batch_cache_get_edges_with_select_id ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_edges()

GPUBatch* DRW_mesh_batch_cache_get_edit_edges ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_facedots()

GPUBatch* DRW_mesh_batch_cache_get_edit_facedots ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_lnors()

GPUBatch* DRW_mesh_batch_cache_get_edit_lnors ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_mesh_analysis()

GPUBatch* DRW_mesh_batch_cache_get_edit_mesh_analysis ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_skin_roots()

GPUBatch* DRW_mesh_batch_cache_get_edit_skin_roots ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_triangles()

GPUBatch* DRW_mesh_batch_cache_get_edit_triangles ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_vertices()

GPUBatch* DRW_mesh_batch_cache_get_edit_vertices ( Mesh me)

◆ DRW_mesh_batch_cache_get_edit_vnors()

GPUBatch* DRW_mesh_batch_cache_get_edit_vnors ( Mesh me)

◆ DRW_mesh_batch_cache_get_edituv_edges()

GPUBatch* DRW_mesh_batch_cache_get_edituv_edges ( Mesh me)

◆ DRW_mesh_batch_cache_get_edituv_facedots()

GPUBatch* DRW_mesh_batch_cache_get_edituv_facedots ( Mesh me)

◆ DRW_mesh_batch_cache_get_edituv_faces()

GPUBatch* DRW_mesh_batch_cache_get_edituv_faces ( Mesh me)

◆ DRW_mesh_batch_cache_get_edituv_faces_stretch_angle()

GPUBatch* DRW_mesh_batch_cache_get_edituv_faces_stretch_angle ( Mesh me)

◆ DRW_mesh_batch_cache_get_edituv_faces_stretch_area()

GPUBatch* DRW_mesh_batch_cache_get_edituv_faces_stretch_area ( Mesh me,
float **  tot_area,
float **  tot_uv_area 
)

◆ DRW_mesh_batch_cache_get_edituv_verts()

GPUBatch* DRW_mesh_batch_cache_get_edituv_verts ( Mesh me)

◆ DRW_mesh_batch_cache_get_facedots_with_select_id()

GPUBatch* DRW_mesh_batch_cache_get_facedots_with_select_id ( Mesh me)

◆ DRW_mesh_batch_cache_get_loose_edges()

GPUBatch* DRW_mesh_batch_cache_get_loose_edges ( Mesh me)

◆ DRW_mesh_batch_cache_get_sculpt_overlays()

GPUBatch* DRW_mesh_batch_cache_get_sculpt_overlays ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface()

GPUBatch* DRW_mesh_batch_cache_get_surface ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface_edges()

GPUBatch* DRW_mesh_batch_cache_get_surface_edges ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface_sculpt()

GPUBatch* DRW_mesh_batch_cache_get_surface_sculpt ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface_shaded()

GPUBatch** DRW_mesh_batch_cache_get_surface_shaded ( Mesh me,
struct GPUMaterial **  gpumat_array,
uint  gpumat_array_len 
)

◆ DRW_mesh_batch_cache_get_surface_texpaint()

GPUBatch** DRW_mesh_batch_cache_get_surface_texpaint ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface_texpaint_single()

GPUBatch* DRW_mesh_batch_cache_get_surface_texpaint_single ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface_vertpaint()

GPUBatch* DRW_mesh_batch_cache_get_surface_vertpaint ( Mesh me)

◆ DRW_mesh_batch_cache_get_surface_weights()

GPUBatch* DRW_mesh_batch_cache_get_surface_weights ( Mesh me)

◆ DRW_mesh_batch_cache_get_triangles_with_select_id()

GPUBatch* DRW_mesh_batch_cache_get_triangles_with_select_id ( Mesh me)

◆ DRW_mesh_batch_cache_get_uv_edges()

GPUBatch* DRW_mesh_batch_cache_get_uv_edges ( Mesh me)

◆ DRW_mesh_batch_cache_get_verts_with_select_id()

GPUBatch* DRW_mesh_batch_cache_get_verts_with_select_id ( Mesh me)

◆ DRW_mesh_batch_cache_get_wireframes_face()

GPUBatch* DRW_mesh_batch_cache_get_wireframes_face ( Mesh me)

◆ DRW_mesh_batch_cache_pos_vertbuf_get()

GPUVertBuf* DRW_mesh_batch_cache_pos_vertbuf_get ( Mesh me)

◆ DRW_mesh_batch_cache_validate()

void DRW_mesh_batch_cache_validate ( Mesh me)

◆ drw_mesh_flags_equal()

static bool drw_mesh_flags_equal ( const bool *  array1,
const bool *  array2,
int  size 
)
static

Definition at line 358 of file draw_cache_impl_mesh.c.

References size().

Referenced by drw_mesh_weight_state_compare().

◆ DRW_mesh_material_count_get()

int DRW_mesh_material_count_get ( Mesh me)

Definition at line 906 of file draw_cache_impl_mesh.c.

References mesh_render_mat_len_get().

Referenced by DRW_cache_object_material_count_get().

◆ drw_mesh_weight_state_clear()

static void drw_mesh_weight_state_clear ( struct DRW_MeshWeightState wstate)
static

◆ drw_mesh_weight_state_compare()

static bool drw_mesh_weight_state_compare ( const struct DRW_MeshWeightState a,
const struct DRW_MeshWeightState b 
)
static

◆ drw_mesh_weight_state_copy()

static void drw_mesh_weight_state_copy ( struct DRW_MeshWeightState wstate_dst,
const struct DRW_MeshWeightState wstate_src 
)
static

Copy selection data from one structure to another, including heap memory.

Definition at line 338 of file draw_cache_impl_mesh.c.

References DRW_MeshWeightState::defgroup_locked, DRW_MeshWeightState::defgroup_sel, DRW_MeshWeightState::defgroup_unlocked, MEM_dupallocN, and MEM_SAFE_FREE.

Referenced by DRW_mesh_batch_cache_create_requested().

◆ drw_mesh_weight_state_extract()

static void drw_mesh_weight_state_extract ( Object ob,
Mesh me,
const ToolSettings ts,
bool  paint_mode,
struct DRW_MeshWeightState wstate 
)
static

◆ editmesh_final_or_this()

BLI_INLINE const Mesh* editmesh_final_or_this ( const Mesh me)

◆ edituv_request_active_uv()

static void edituv_request_active_uv ( MeshBatchCache cache,
Mesh me 
)
static

◆ mesh_batch_cache_add_request()

BLI_INLINE void mesh_batch_cache_add_request ( MeshBatchCache cache,
DRWBatchFlag  new_flag 
)

◆ mesh_batch_cache_check_vertex_group()

static void mesh_batch_cache_check_vertex_group ( MeshBatchCache cache,
const struct DRW_MeshWeightState wstate 
)
static

◆ mesh_batch_cache_clear()

static void mesh_batch_cache_clear ( Mesh me)
static

◆ mesh_batch_cache_discard_shaded_tri()

static void mesh_batch_cache_discard_shaded_tri ( MeshBatchCache cache)
static

◆ mesh_batch_cache_discard_surface_batches()

static void mesh_batch_cache_discard_surface_batches ( MeshBatchCache cache)
static

◆ mesh_batch_cache_discard_uvedit()

static void mesh_batch_cache_discard_uvedit ( MeshBatchCache cache)
static

◆ mesh_batch_cache_discard_uvedit_select()

static void mesh_batch_cache_discard_uvedit_select ( MeshBatchCache cache)
static

◆ mesh_batch_cache_get()

static MeshBatchCache* mesh_batch_cache_get ( Mesh me)
static

Definition at line 519 of file draw_cache_impl_mesh.c.

References Mesh_Runtime::batch_cache, and Mesh::runtime.

Referenced by DRW_mesh_batch_cache_create_requested(), DRW_mesh_batch_cache_get_all_edges(), DRW_mesh_batch_cache_get_all_verts(), DRW_mesh_batch_cache_get_edge_detection(), DRW_mesh_batch_cache_get_edges_with_select_id(), DRW_mesh_batch_cache_get_edit_edges(), DRW_mesh_batch_cache_get_edit_facedots(), DRW_mesh_batch_cache_get_edit_lnors(), DRW_mesh_batch_cache_get_edit_mesh_analysis(), DRW_mesh_batch_cache_get_edit_skin_roots(), DRW_mesh_batch_cache_get_edit_triangles(), DRW_mesh_batch_cache_get_edit_vertices(), DRW_mesh_batch_cache_get_edit_vnors(), DRW_mesh_batch_cache_get_edituv_edges(), DRW_mesh_batch_cache_get_edituv_facedots(), DRW_mesh_batch_cache_get_edituv_faces(), DRW_mesh_batch_cache_get_edituv_faces_stretch_angle(), DRW_mesh_batch_cache_get_edituv_faces_stretch_area(), DRW_mesh_batch_cache_get_edituv_verts(), DRW_mesh_batch_cache_get_facedots_with_select_id(), DRW_mesh_batch_cache_get_loose_edges(), DRW_mesh_batch_cache_get_sculpt_overlays(), DRW_mesh_batch_cache_get_surface(), DRW_mesh_batch_cache_get_surface_edges(), DRW_mesh_batch_cache_get_surface_sculpt(), DRW_mesh_batch_cache_get_surface_shaded(), DRW_mesh_batch_cache_get_surface_texpaint(), DRW_mesh_batch_cache_get_surface_texpaint_single(), DRW_mesh_batch_cache_get_surface_vertpaint(), DRW_mesh_batch_cache_get_surface_weights(), DRW_mesh_batch_cache_get_triangles_with_select_id(), DRW_mesh_batch_cache_get_uv_edges(), DRW_mesh_batch_cache_get_verts_with_select_id(), DRW_mesh_batch_cache_get_wireframes_face(), and DRW_mesh_batch_cache_pos_vertbuf_get().

◆ mesh_batch_cache_init()

static void mesh_batch_cache_init ( Mesh me)
static

◆ mesh_batch_cache_request_surface_batches()

static void mesh_batch_cache_request_surface_batches ( MeshBatchCache cache)
static

◆ mesh_batch_cache_valid()

static bool mesh_batch_cache_valid ( Mesh me)
static

◆ mesh_cd_calc_active_mask_uv_layer()

static void mesh_cd_calc_active_mask_uv_layer ( const Mesh me,
DRW_MeshCDMask cd_used 
)
static

◆ mesh_cd_calc_active_mloopcol_layer()

static void mesh_cd_calc_active_mloopcol_layer ( const Mesh me,
DRW_MeshCDMask cd_used 
)
static

◆ mesh_cd_calc_active_uv_layer()

static void mesh_cd_calc_active_uv_layer ( const Mesh me,
DRW_MeshCDMask cd_used 
)
static

◆ mesh_cd_calc_active_vcol_layer()

static void mesh_cd_calc_active_vcol_layer ( const Mesh me,
DRW_MeshCDMask cd_used 
)
static

◆ mesh_cd_calc_edit_uv_layer()

static void mesh_cd_calc_edit_uv_layer ( const Mesh UNUSEDme,
DRW_MeshCDMask cd_used 
)
static

Definition at line 105 of file draw_cache_impl_mesh.c.

References DRW_MeshCDMask::edit_uv.

Referenced by edituv_request_active_uv().

◆ mesh_cd_calc_used_gpu_layers()

static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers ( const Mesh me,
struct GPUMaterial **  gpumat_array,
int  gpumat_array_len 
)
static

◆ mesh_cd_layers_type_clear()

BLI_INLINE void mesh_cd_layers_type_clear ( DRW_MeshCDMask a)

◆ mesh_cd_layers_type_equal()

BLI_INLINE bool mesh_cd_layers_type_equal ( DRW_MeshCDMask  a,
DRW_MeshCDMask  b 
)

Definition at line 82 of file draw_cache_impl_mesh.c.

References Freestyle::a.

Referenced by DRW_mesh_batch_cache_free_old().

◆ mesh_cd_layers_type_merge()

BLI_INLINE void mesh_cd_layers_type_merge ( DRW_MeshCDMask a,
DRW_MeshCDMask  b 
)

◆ mesh_cd_layers_type_overlap()

BLI_INLINE bool mesh_cd_layers_type_overlap ( DRW_MeshCDMask  a,
DRW_MeshCDMask  b 
)

Definition at line 77 of file draw_cache_impl_mesh.c.

References Freestyle::a.

Referenced by DRW_mesh_batch_cache_create_requested().

◆ mesh_cd_ldata_get_from_mesh()

BLI_INLINE const CustomData* mesh_cd_ldata_get_from_mesh ( const Mesh me)

◆ mesh_cd_vdata_get_from_mesh()

BLI_INLINE const CustomData* mesh_cd_vdata_get_from_mesh ( const Mesh me)

◆ sculpt_request_active_vcol()

static void sculpt_request_active_vcol ( MeshBatchCache cache,
Mesh me 
)
static

◆ texpaint_request_active_uv()

static void texpaint_request_active_uv ( MeshBatchCache cache,
Mesh me 
)
static

◆ texpaint_request_active_vcol()

static void texpaint_request_active_vcol ( MeshBatchCache cache,
Mesh me 
)
static