Blender V4.3
blender::draw Namespace Reference

Namespaces

namespace  color_management
 
namespace  command
 
namespace  compositor
 
namespace  detail
 
namespace  image_engine
 
namespace  overlay
 
namespace  pbvh
 
namespace  select
 

Classes

struct  AreaInfo
 
struct  AttributeConverter
 
struct  AttributeConverter< bool >
 
struct  AttributeConverter< ColorGeometry4b >
 
struct  AttributeConverter< ColorGeometry4f >
 
struct  AttributeConverter< float >
 
struct  AttributeConverter< float2 >
 
struct  AttributeConverter< float3 >
 
struct  AttributeConverter< int >
 
struct  AttributeConverter< int2 >
 
struct  AttributeConverter< int8_t >
 
struct  AttributeConverter< math::Quaternion >
 
struct  BVHTree_OverlapData
 
struct  CompressedPatchCoord
 
struct  CurveBatchCache
 
struct  CurveRenderData
 
struct  CurvesBatchCache
 
struct  CurvesEvalCache
 
struct  CurvesEvalCall
 
struct  CurvesEvalFinalCache
 
struct  CurvesUniformBufPool
 
class  DebugDraw
 
struct  DRW_AttributeRequest
 
struct  DRW_Attributes
 
struct  DRW_MeshCDMask
 
struct  DRW_MeshWeightState
 
struct  DRWCacheBuildingContext
 
struct  DRWPatchMap
 
struct  DRWSubdivCache
 
struct  DRWSubdivUboStorage
 
struct  EditLoopData
 
struct  EditStrandData
 
class  Framebuffer
 
struct  GreasePencilBatchCache
 
struct  GreasePencilColorVert
 
struct  GreasePencilStrokeVert
 
struct  HairAttributeID
 
class  Image
 
struct  LatticeBatchCache
 
struct  LatticeRenderData
 
class  Manager
 
struct  MEdgeDataPrev
 
struct  MeshBatchCache
 
struct  MeshBatchList
 
struct  MeshBufferCache
 
struct  MeshBufferList
 
struct  MeshExtract_StretchAngle_Data
 
struct  MeshExtractLooseGeom
 
struct  MeshRenderData
 
struct  MeshRenderDataUpdateTaskData
 
struct  ObjectRef
 
struct  ParticleBatchCache
 
struct  ParticleDrawSource
 
struct  ParticlePointCache
 
class  PassSortable
 
struct  PointCloudBatchCache
 
struct  PointCloudEvalCache
 
struct  PositionAndParameter
 
struct  ResourceHandle
 
struct  SculptBatch
 
struct  SkinRootData
 
struct  SortedFaceData
 
class  StorageArrayBuffer
 
class  StorageBuffer
 
class  StorageVectorBuffer
 
class  SwapChain
 
class  TestAlloc
 
class  TestDefrag
 
class  Texture
 
class  TextureFromPool
 
class  TextureRef
 
class  UniformArrayBuffer
 
class  UniformBuffer
 
struct  UVStretchAngle
 
class  View
 
struct  VolumeBatchCache
 
struct  VolumeWireframeUserData
 

Typedefs

using CurvesInfosBuf = UniformBuffer<CurvesInfos>
 
using PassSimple = detail::Pass<command::DrawCommandBuf>
 
using PassMain = detail::Pass<command::DrawMultiBuf>
 
using ObjectBoundsBuf = StorageArrayBuffer<ObjectBounds, 128>
 
using ObjectInfosBuf = StorageArrayBuffer<ObjectInfos, 128>
 
using VisibilityBuf = StorageArrayBuffer<uint, 4, true>
 
using ShadowPageCacheBuf = draw::StorageArrayBuffer<uint2, SHADOW_MAX_PAGE, false>
 
using ShadowTileDataBuf = draw::StorageArrayBuffer<ShadowTileDataPacked, SHADOW_MAX_TILE, false>
 

Enumerations

enum  { DRW_MESH_WEIGHT_STATE_MULTIPAINT = (1 << 0) , DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE = (1 << 1) , DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE = (1 << 2) }
 
enum  DRWBatchFlag {
  MBC_SURFACE = (1u << MBC_BATCH_INDEX(surface)) , MBC_SURFACE_WEIGHTS = (1u << MBC_BATCH_INDEX(surface_weights)) , MBC_EDIT_TRIANGLES = (1u << MBC_BATCH_INDEX(edit_triangles)) , MBC_EDIT_VERTICES = (1u << MBC_BATCH_INDEX(edit_vertices)) ,
  MBC_EDIT_EDGES = (1u << MBC_BATCH_INDEX(edit_edges)) , MBC_EDIT_VNOR = (1u << MBC_BATCH_INDEX(edit_vnor)) , MBC_EDIT_LNOR = (1u << MBC_BATCH_INDEX(edit_lnor)) , MBC_EDIT_FACEDOTS = (1u << MBC_BATCH_INDEX(edit_fdots)) ,
  MBC_EDIT_MESH_ANALYSIS = (1u << MBC_BATCH_INDEX(edit_mesh_analysis)) , MBC_SKIN_ROOTS = (1u << MBC_BATCH_INDEX(edit_skin_roots)) , MBC_EDITUV_FACES_STRETCH_AREA = (1u << MBC_BATCH_INDEX(edituv_faces_stretch_area)) , MBC_EDITUV_FACES_STRETCH_ANGLE = (1u << MBC_BATCH_INDEX(edituv_faces_stretch_angle)) ,
  MBC_EDITUV_FACES = (1u << MBC_BATCH_INDEX(edituv_faces)) , MBC_EDITUV_EDGES = (1u << MBC_BATCH_INDEX(edituv_edges)) , MBC_EDITUV_VERTS = (1u << MBC_BATCH_INDEX(edituv_verts)) , MBC_EDITUV_FACEDOTS = (1u << MBC_BATCH_INDEX(edituv_fdots)) ,
  MBC_EDIT_SELECTION_VERTS = (1u << MBC_BATCH_INDEX(edit_selection_verts)) , MBC_EDIT_SELECTION_EDGES = (1u << MBC_BATCH_INDEX(edit_selection_edges)) , MBC_EDIT_SELECTION_FACES = (1u << MBC_BATCH_INDEX(edit_selection_faces)) , MBC_EDIT_SELECTION_FACEDOTS = (1u << MBC_BATCH_INDEX(edit_selection_fdots)) ,
  MBC_ALL_VERTS = (1u << MBC_BATCH_INDEX(all_verts)) , MBC_ALL_EDGES = (1u << MBC_BATCH_INDEX(all_edges)) , MBC_LOOSE_EDGES = (1u << MBC_BATCH_INDEX(loose_edges)) , MBC_EDGE_DETECTION = (1u << MBC_BATCH_INDEX(edge_detection)) ,
  MBC_WIRE_EDGES = (1u << MBC_BATCH_INDEX(wire_edges)) , MBC_WIRE_LOOPS = (1u << MBC_BATCH_INDEX(wire_loops)) , MBC_WIRE_LOOPS_UVS = (1u << MBC_BATCH_INDEX(wire_loops_uvs)) , MBC_SCULPT_OVERLAYS = (1u << MBC_BATCH_INDEX(sculpt_overlays)) ,
  MBC_VIEWER_ATTRIBUTE_OVERLAY = (1u << MBC_BATCH_INDEX(surface_viewer_attribute)) , MBC_SURFACE_PER_MAT = (1u << MBC_BATCH_LEN)
}
 
enum  { COLOR_NURB_ULINE_ID = TH_HANDLE_AUTOCLAMP - TH_HANDLE_FREE + 2 , TOT_HANDLE_COL }
 
enum  {
  CU_DATATYPE_WIRE = 1 << 0 , CU_DATATYPE_OVERLAY = 1 << 1 , CU_DATATYPE_NORMAL = 1 << 2 , CU_DATATYPE_SURFACE = 1 << 3 ,
  CU_DATATYPE_TEXT_SELECT = 1 << 4
}
 
enum  { LR_DATATYPE_VERT = 1 << 0 , LR_DATATYPE_EDGE = 1 << 1 , LR_DATATYPE_OVERLAY = 1 << 2 }
 
enum  ParticleSource { PARTICLE_SOURCE_PARENT , PARTICLE_SOURCE_CHILDREN }
 
enum  {
  SHADER_BUFFER_LINES , SHADER_BUFFER_LINES_LOOSE , SHADER_BUFFER_EDGE_FAC , SHADER_BUFFER_LNOR ,
  SHADER_BUFFER_TRIS , SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS , SHADER_BUFFER_NORMALS_ACCUMULATE , SHADER_BUFFER_NORMALS_FINALIZE ,
  SHADER_BUFFER_CUSTOM_NORMALS_FINALIZE , SHADER_PATCH_EVALUATION , SHADER_PATCH_EVALUATION_FVAR , SHADER_PATCH_EVALUATION_FACE_DOTS ,
  SHADER_PATCH_EVALUATION_FACE_DOTS_WITH_NORMALS , SHADER_PATCH_EVALUATION_ORCO , SHADER_COMP_CUSTOM_DATA_INTERP_1D , SHADER_COMP_CUSTOM_DATA_INTERP_2D ,
  SHADER_COMP_CUSTOM_DATA_INTERP_3D , SHADER_COMP_CUSTOM_DATA_INTERP_4D , SHADER_BUFFER_SCULPT_DATA , SHADER_BUFFER_UV_STRETCH_ANGLE ,
  SHADER_BUFFER_UV_STRETCH_AREA , NUM_SHADERS
}
 
enum  CurvesEvalShader { CURVES_EVAL_CATMULL_ROM = 0 , CURVES_EVAL_BEZIER = 1 }
 
enum  SculptBatchFeature {
  SCULPT_BATCH_DEFAULT = 0 , SCULPT_BATCH_WIREFRAME = 1 << 0 , SCULPT_BATCH_MASK = 1 << 1 , SCULPT_BATCH_FACE_SET = 1 << 2 ,
  SCULPT_BATCH_VERTEX_COLOR = 1 << 3 , SCULPT_BATCH_UV = 1 << 4
}
 

Functions

void DRW_cache_free_old_subdiv ()
 
void DRW_subdiv_free ()
 
GPUVertFormat init_format_for_attribute (const eCustomDataType data_type, const StringRefNull vbo_name)
 
void vertbuf_data_extract_direct (const GSpan attribute, gpu::VertBuf &vbo)
 
static bool drw_attributes_has_request (const DRW_Attributes *requests, const DRW_AttributeRequest &req)
 
static void drw_attributes_merge_requests (const DRW_Attributes *src_requests, DRW_Attributes *dst_requests)
 
void drw_attributes_clear (DRW_Attributes *attributes)
 
void drw_attributes_merge (DRW_Attributes *dst, const DRW_Attributes *src, std::mutex &render_mutex)
 
bool drw_attributes_overlap (const DRW_Attributes *a, const DRW_Attributes *b)
 
void drw_attributes_add_request (DRW_Attributes *attrs, const char *name, const eCustomDataType type, const int layer_index, const blender::bke::AttrDomain domain)
 
bool drw_custom_data_match_attribute (const CustomData &custom_data, const char *name, int *r_layer_index, eCustomDataType *r_type)
 
blender::gpu::Batch * DRW_cache_volume_face_wireframe_get (Object *ob)
 
blender::gpu::Batch * DRW_cache_volume_selection_surface_get (Object *ob)
 
DRWVolumeGridDRW_volume_batch_cache_get_grid (Volume *volume, const bke::VolumeGridData *volume_grid)
 
blender::gpu::Batch * DRW_cache_grease_pencil_get (const Scene *scene, Object *ob)
 
blender::gpu::Batch * DRW_cache_grease_pencil_edit_points_get (const Scene *scene, Object *ob)
 
blender::gpu::Batch * DRW_cache_grease_pencil_edit_lines_get (const Scene *scene, Object *ob)
 
gpu::VertBufDRW_cache_grease_pencil_position_buffer_get (const Scene *scene, Object *ob)
 
gpu::VertBufDRW_cache_grease_pencil_color_buffer_get (const Scene *scene, Object *ob)
 
blender::gpu::Batch * DRW_cache_grease_pencil_weight_points_get (const Scene *scene, Object *ob)
 
blender::gpu::Batch * DRW_cache_grease_pencil_weight_lines_get (const Scene *scene, Object *ob)
 
blender::gpu::Batch * DRW_cache_grease_pencil_face_wireframe_get (const Scene *scene, Object *ob)
 
int mesh_render_mat_len_get (const Object &object, const Mesh &mesh)
 
 ENUM_OPERATORS (DRWBatchFlag, MBC_SURFACE_PER_MAT)
 
 BLI_STATIC_ASSERT (MBC_BATCH_LEN< 32, "Number of batches exceeded the limit of bit fields")
 
static void mesh_extract_render_data_node_exec (void *__restrict task_data)
 
static void extract_set_bits (const BitSpan bits, MutableSpan< int > indices)
 
static void mesh_render_data_loose_geom_mesh (const MeshRenderData &mr, MeshBufferCache &cache)
 
static void mesh_render_data_loose_verts_bm (const MeshRenderData &mr, MeshBufferCache &cache, BMesh &bm)
 
static void mesh_render_data_loose_edges_bm (const MeshRenderData &mr, MeshBufferCache &cache, BMesh &bm)
 
static void mesh_render_data_loose_geom_build (const MeshRenderData &mr, MeshBufferCache &cache)
 
static void mesh_render_data_loose_geom_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
 
void mesh_render_data_update_loose_geom (MeshRenderData &mr, MeshBufferCache &cache)
 
static void curve_batch_cache_clear (Curve *cu)
 
static void curve_render_overlay_verts_edges_len_get (ListBase *lb, int *r_vert_len, int *r_edge_len)
 
static void curve_eval_render_wire_verts_edges_len_get (const bke::CurvesGeometry &curves, int *r_curve_len, int *r_vert_len, int *r_edge_len)
 
static int curve_render_normal_len_get (const ListBase *lb, const CurveCache *ob_curve_cache)
 
static CurveRenderDatacurve_render_data_create (Curve *cu, CurveCache *ob_curve_cache, const int types)
 
static void curve_render_data_free (CurveRenderData *rdata)
 
static int curve_render_data_overlay_verts_len_get (const CurveRenderData *rdata)
 
static int curve_render_data_overlay_edges_len_get (const CurveRenderData *rdata)
 
static int curve_render_data_wire_verts_len_get (const CurveRenderData *rdata)
 
static int curve_render_data_wire_edges_len_get (const CurveRenderData *rdata)
 
static int curve_render_data_wire_curve_len_get (const CurveRenderData *rdata)
 
static int curve_render_data_normal_len_get (const CurveRenderData *rdata)
 
static bool curve_batch_cache_valid (Curve *cu)
 
static void curve_batch_cache_init (Curve *cu)
 
static CurveBatchCachecurve_batch_cache_get (Curve *cu)
 
static GPUVertFormat single_attr_vbo_format (const char *name, const GPUVertCompType comp_type, const uint comp_len, const GPUVertFetchMode fetch_mode, uint &attr_id=DUMMY_ID)
 
static bool batch_cache_is_dirty (const Curves &curves)
 
static void init_batch_cache (Curves &curves)
 
static void discard_attributes (CurvesEvalCache &eval_cache)
 
static void clear_edit_data (CurvesBatchCache *cache)
 
static void clear_final_data (CurvesEvalFinalCache &final_cache)
 
static void clear_eval_data (CurvesEvalCache &eval_cache)
 
static void clear_batch_cache (Curves &curves)
 
static CurvesBatchCacheget_batch_cache (Curves &curves)
 
static void fill_points_position_time_vbo (const OffsetIndices< int > points_by_curve, const Span< float3 > positions, MutableSpan< PositionAndParameter > posTime_data, MutableSpan< float > hairLength_data)
 
static void create_points_position_time_vbo (const bke::CurvesGeometry &curves, CurvesEvalCache &cache)
 
static uint32_t bezier_data_value (int8_t handle_type, bool is_active)
 
static void create_edit_points_position_and_data (const bke::CurvesGeometry &curves, const IndexMask bezier_curves, const OffsetIndices< int > bezier_dst_offsets, const bke::crazyspace::GeometryDeformation deformation, CurvesBatchCache &cache)
 
static void create_edit_points_selection (const bke::CurvesGeometry &curves, const IndexMask bezier_curves, const OffsetIndices< int > bezier_dst_offsets, CurvesBatchCache &cache)
 
static void create_sculpt_cage_ibo (const OffsetIndices< int > points_by_curve, CurvesBatchCache &cache)
 
static void calc_edit_handles_ibo (const bke::CurvesGeometry &curves, const IndexMask bezier_curves, const OffsetIndices< int > bezier_offsets, const IndexMask other_curves, CurvesBatchCache &cache)
 
static void alloc_final_attribute_vbo (CurvesEvalCache &cache, const GPUVertFormat &format, const int index, const char *)
 
static void ensure_control_point_attribute (const Curves &curves, CurvesEvalCache &cache, const DRW_AttributeRequest &request, const int index, const GPUVertFormat &format)
 
static void ensure_final_attribute (const Curves &curves, CurvesEvalCache &cache, const DRW_AttributeRequest &request, const int index)
 
static void fill_curve_offsets_vbos (const OffsetIndices< int > points_by_curve, GPUVertBufRaw &data_step, GPUVertBufRaw &seg_step)
 
static void create_curve_offsets_vbos (const OffsetIndices< int > points_by_curve, CurvesEvalCache &cache)
 
static void alloc_final_points_vbo (CurvesEvalCache &cache)
 
static void calc_final_indices (const bke::CurvesGeometry &curves, CurvesEvalCache &cache, const int thickness_res)
 
static bool ensure_attributes (const Curves &curves, CurvesBatchCache &cache, const GPUMaterial *gpu_material)
 
static void request_attribute (Curves &curves, const char *name)
 
void drw_curves_get_attribute_sampler_name (const char *layer_name, char r_sampler_name[32])
 
bool curves_ensure_procedural_data (Curves *curves_id, CurvesEvalCache **r_cache, const GPUMaterial *gpu_material, const int subdiv, const int thickness_res)
 
static void create_edit_lines_ibo (const bke::CurvesGeometry &curves, CurvesBatchCache &cache)
 
static void create_edit_points_position_vbo (const bke::CurvesGeometry &curves, const bke::crazyspace::GeometryDeformation &, CurvesBatchCache &cache)
 
static void lattice_batch_cache_clear (Lattice *lt)
 
static int vert_len_calc (int u, int v, int w)
 
static int edge_len_calc (int u, int v, int w)
 
static int lattice_render_verts_len_get (Lattice *lt)
 
static int lattice_render_edges_len_get (Lattice *lt)
 
static LatticeRenderDatalattice_render_data_create (Lattice *lt, const int types)
 
static void lattice_render_data_free (LatticeRenderData *rdata)
 
static int lattice_render_data_verts_len_get (const LatticeRenderData *rdata)
 
static int lattice_render_data_edges_len_get (const LatticeRenderData *rdata)
 
static const BPointlattice_render_data_vert_bpoint (const LatticeRenderData *rdata, const int vert_idx)
 
static bool lattice_batch_cache_valid (Lattice *lt)
 
static void lattice_batch_cache_init (Lattice *lt)
 
static LatticeBatchCachelattice_batch_cache_get (Lattice *lt)
 
static gpu::VertBuflattice_batch_cache_get_pos (LatticeRenderData *rdata, LatticeBatchCache *cache, bool use_weight, const int actdef)
 
static gpu::IndexBuflattice_batch_cache_get_edges (LatticeRenderData *rdata, LatticeBatchCache *cache)
 
static void lattice_batch_cache_create_overlay_batches (Lattice *lt)
 
static void particle_batch_cache_clear (ParticleSystem *psys)
 
static GPUVertFormatedit_points_vert_format_get (uint *r_pos_id, uint *r_selection_id)
 
static bool particle_batch_cache_valid (ParticleSystem *psys)
 
static void particle_batch_cache_init (ParticleSystem *psys)
 
static ParticleBatchCacheparticle_batch_cache_get (ParticleSystem *psys)
 
static void particle_batch_cache_clear_point (ParticlePointCache *point_cache)
 
static void particle_batch_cache_clear_hair (ParticleHairCache *hair_cache)
 
static void count_cache_segment_keys (ParticleCacheKey **pathcache, const int num_path_cache_keys, ParticleHairCache *hair_cache)
 
static void ensure_seg_pt_count (PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *hair_cache)
 
static void particle_pack_mcol (MCol *mcol, ushort r_scol[3])
 
static void particle_calculate_parent_uvs (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_uv_layers, const int parent_index, const MTFace **mtfaces, float(*r_uv)[2])
 
static void particle_calculate_parent_mcol (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_col_layers, const int parent_index, const MCol **mcols, MCol *r_mcol)
 
static void particle_interpolate_children_uvs (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_uv_layers, const int child_index, const MTFace **mtfaces, float(*r_uv)[2])
 
static void particle_interpolate_children_mcol (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_col_layers, const int child_index, const MCol **mcols, MCol *r_mcol)
 
static void particle_calculate_uvs (ParticleSystem *psys, ParticleSystemModifierData *psmd, const bool is_simple, const int num_uv_layers, const int parent_index, const int child_index, const MTFace **mtfaces, float(**r_parent_uvs)[2], float(**r_uv)[2])
 
static void particle_calculate_mcol (ParticleSystem *psys, ParticleSystemModifierData *psmd, const bool is_simple, const int num_col_layers, const int parent_index, const int child_index, const MCol **mcols, MCol **r_parent_mcol, MCol **r_mcol)
 
static int particle_batch_cache_fill_segments (ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleCacheKey **path_cache, const ParticleSource particle_source, const int global_offset, const int start_index, const int num_path_keys, const int num_uv_layers, const int num_col_layers, const MTFace **mtfaces, const MCol **mcols, uint *uv_id, uint *col_id, float(***r_parent_uvs)[2], MCol ***r_parent_mcol, GPUIndexBufBuilder *elb, HairAttributeID *attr_id, ParticleHairCache *hair_cache)
 
static void particle_batch_cache_fill_segments_proc_pos (ParticleCacheKey **path_cache, const int num_path_keys, GPUVertBufRaw *attr_step, GPUVertBufRaw *length_step)
 
static float particle_key_weight (const ParticleData *particle, int strand, float t)
 
static int particle_batch_cache_fill_segments_edit (const PTCacheEdit *, const ParticleData *particle, ParticleCacheKey **path_cache, const int start_index, const int num_path_keys, GPUIndexBufBuilder *elb, GPUVertBufRaw *attr_step)
 
static int particle_batch_cache_fill_segments_indices (ParticleCacheKey **path_cache, const int start_index, const int num_path_keys, const int res, GPUIndexBufBuilder *elb)
 
static int particle_batch_cache_fill_strands_data (ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleCacheKey **path_cache, const ParticleSource particle_source, const int start_index, const int num_path_keys, GPUVertBufRaw *data_step, GPUVertBufRaw *seg_step, float(***r_parent_uvs)[2], GPUVertBufRaw *uv_step, const MTFace **mtfaces, int num_uv_layers, MCol ***r_parent_mcol, GPUVertBufRaw *col_step, const MCol **mcols, int num_col_layers)
 
static void particle_batch_cache_ensure_procedural_final_points (ParticleHairCache *cache, int subdiv)
 
static void particle_batch_cache_ensure_procedural_strand_data (PTCacheEdit *edit, ParticleSystem *psys, ModifierData *md, ParticleHairCache *cache)
 
static void particle_batch_cache_ensure_procedural_indices (PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *cache, int thickness_res, int subdiv)
 
static void particle_batch_cache_ensure_procedural_pos (PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *cache, GPUMaterial *)
 
static void particle_batch_cache_ensure_pos_and_seg (PTCacheEdit *edit, ParticleSystem *psys, ModifierData *md, ParticleHairCache *hair_cache)
 
static void particle_batch_cache_ensure_pos (Object *object, ParticleSystem *psys, ParticlePointCache *point_cache)
 
static void drw_particle_update_ptcache_edit (Object *object_eval, ParticleSystem *psys, PTCacheEdit *edit)
 
static void drw_particle_update_ptcache (Object *object_eval, ParticleSystem *psys)
 
static void drw_particle_get_hair_source (Object *object, ParticleSystem *psys, ModifierData *md, PTCacheEdit *edit, ParticleDrawSource *r_draw_source)
 
static void particle_batch_cache_ensure_edit_pos_and_seg (PTCacheEdit *edit, ParticleSystem *psys, ModifierData *, ParticleHairCache *hair_cache, bool use_weight)
 
static void ensure_edit_inner_points_count (const PTCacheEdit *edit, ParticleBatchCache *cache)
 
static void particle_batch_cache_ensure_edit_inner_pos (PTCacheEdit *edit, ParticleBatchCache *cache)
 
static void ensure_edit_tip_points_count (const PTCacheEdit *edit, ParticleBatchCache *cache)
 
static void particle_batch_cache_ensure_edit_tip_pos (PTCacheEdit *edit, ParticleBatchCache *cache)
 
bool particles_ensure_procedural_data (Object *object, ParticleSystem *psys, ModifierData *md, ParticleHairCache **r_hair_cache, GPUMaterial *gpu_material, int subdiv, int thickness_res)
 
static const char * get_shader_code (int shader_type)
 
static const char * get_shader_name (int shader_type)
 
static GPUShaderget_patch_evaluation_shader (int shader_type)
 
static GPUShaderget_subdiv_shader (int shader_type)
 
static GPUShaderget_subdiv_custom_data_shader (int comp_type, int dimensions)
 
static uint tris_count_from_number_of_loops (const uint number_of_loops)
 
static uint get_dispatch_size (uint elements)
 
static void drw_subdiv_compute_dispatch (const DRWSubdivCache &cache, GPUShader *shader, const int src_offset, const int dst_offset, uint total_dispatch_size, const bool has_sculpt_mask=false, const uint edge_loose_offset=0)
 
void draw_subdiv_extract_pos_nor (const DRWSubdivCache &cache, gpu::VertBuf *flags_buffer, gpu::VertBuf *pos_nor, gpu::VertBuf *orco)
 
void draw_subdiv_extract_uvs (const DRWSubdivCache &cache, gpu::VertBuf *uvs, const int face_varying_channel, const int dst_offset)
 
void draw_subdiv_interp_custom_data (const DRWSubdivCache &cache, gpu::VertBuf &src_data, gpu::VertBuf &dst_data, int comp_type, int dimensions, int dst_offset)
 
void draw_subdiv_build_sculpt_data_buffer (const DRWSubdivCache &cache, gpu::VertBuf *mask_vbo, gpu::VertBuf *face_set_vbo, gpu::VertBuf *sculpt_data)
 
void draw_subdiv_accumulate_normals (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *face_adjacency_offsets, gpu::VertBuf *face_adjacency_lists, gpu::VertBuf *vertex_loop_map, gpu::VertBuf *vert_normals)
 
void draw_subdiv_finalize_normals (const DRWSubdivCache &cache, gpu::VertBuf *vert_normals, gpu::VertBuf *subdiv_loop_subdiv_vert_index, gpu::VertBuf *pos_nor)
 
void draw_subdiv_finalize_custom_normals (const DRWSubdivCache &cache, gpu::VertBuf *src_custom_normals, gpu::VertBuf *pos_nor)
 
void draw_subdiv_build_tris_buffer (const DRWSubdivCache &cache, gpu::IndexBuf *subdiv_tris, const int material_count)
 
void draw_subdiv_build_fdots_buffers (const DRWSubdivCache &cache, gpu::VertBuf *fdots_pos, gpu::VertBuf *fdots_nor, gpu::IndexBuf *fdots_indices)
 
void draw_subdiv_build_lines_buffer (const DRWSubdivCache &cache, gpu::IndexBuf *lines_indices)
 
void draw_subdiv_build_lines_loose_buffer (const DRWSubdivCache &cache, gpu::IndexBuf *lines_indices, gpu::VertBuf *lines_flags, uint edge_loose_offset, uint num_loose_edges)
 
void draw_subdiv_build_edge_fac_buffer (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *edge_draw_flag, gpu::VertBuf *poly_other_map, gpu::VertBuf *edge_fac)
 
void draw_subdiv_build_lnor_buffer (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *lnor)
 
void draw_subdiv_build_edituv_stretch_area_buffer (const DRWSubdivCache &cache, gpu::VertBuf *coarse_data, gpu::VertBuf *subdiv_data)
 
void draw_subdiv_build_edituv_stretch_angle_buffer (const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *uvs, int uvs_offset, gpu::VertBuf *stretch_angles)
 
static void draw_subdiv_cache_ensure_mat_offsets (DRWSubdivCache &cache, const Mesh *mesh_eval, uint mat_len)
 
static bool draw_subdiv_create_requested_buffers (Object &ob, Mesh &mesh, MeshBatchCache &batch_cache, MeshBufferCache &mbc, const bool is_editmode, const bool is_paint_mode, const bool edit_mode_active, const float4x4 &object_to_world, const bool do_final, const bool do_uvedit, const bool do_cage, const ToolSettings *ts, const bool use_hide, OpenSubdiv_EvaluatorCache *evaluator_cache)
 
void DRW_subdivide_loose_geom (DRWSubdivCache &subdiv_cache, const MeshBufferCache &cache)
 
void DRW_create_subdivision (Object &ob, Mesh &mesh, MeshBatchCache &batch_cache, MeshBufferCache &mbc, const bool is_editmode, const bool is_paint_mode, const bool edit_mode_active, const float4x4 &object_to_world, const bool do_final, const bool do_uvedit, const bool do_cage, const ToolSettings *ts, const bool use_hide)
 
void DRW_subdiv_cache_free (bke::subdiv::Subdiv *subdiv)
 
static void volume_batch_cache_clear (Volume *volume)
 
static bool volume_batch_cache_valid (Volume *volume)
 
static void volume_batch_cache_init (Volume *volume)
 
static VolumeBatchCachevolume_batch_cache_get (Volume *volume)
 
static void drw_volume_wireframe_cb (void *userdata, const float(*verts)[3], const int(*edges)[2], int totvert, int totedge)
 
static void drw_volume_selection_surface_cb (void *userdata, float(*verts)[3], int(*tris)[3], int totvert, int tottris)
 
static DRWVolumeGridvolume_grid_cache_get (const Volume *volume, const bke::VolumeGridData *grid, VolumeBatchCache *cache)
 
void hair_init ()
 
gpu::VertBufhair_pos_buffer_get (Scene *scene, Object *object, ParticleSystem *psys, ModifierData *md)
 
void hair_update (Manager &manager)
 
void hair_free ()
 
gpu::Batch * hair_sub_pass_setup (PassMain::Sub &sub_ps, const Scene *scene, Object *object, ParticleSystem *psys, ModifierData *md, GPUMaterial *gpu_material=nullptr)
 
void curves_init ()
 
gpu::VertBufcurves_pos_buffer_get (Scene *scene, Object *object)
 
void curves_update (Manager &manager)
 
void curves_free ()
 
gpu::Batch * curves_sub_pass_setup (PassMain::Sub &ps, const Scene *scene, Object *ob, GPUMaterial *gpu_material=nullptr)
 
gpu::Batch * point_cloud_sub_pass_setup (PassMain::Sub &sub_ps, Object *object, GPUMaterial *gpu_material=nullptr)
 
PassMain::Subvolume_sub_pass (PassMain::Sub &ps, Scene *scene, Object *ob, GPUMaterial *gpu_material)
 
gpu::VertBufDRW_curves_pos_buffer_get (Object *object)
 
DRWShadingGroupDRW_shgroup_curves_create_sub (Object *object, DRWShadingGroup *shgrp, GPUMaterial *gpu_material)
 
void DRW_curves_init (DRWData *drw_data)
 
void DRW_curves_ubos_pool_free (CurvesUniformBufPool *pool)
 
void DRW_curves_update ()
 
void DRW_curves_free ()
 
DRWShadingGroupDRW_shgroup_pointcloud_create_sub (Object *object, DRWShadingGroup *shgrp_parent, GPUMaterial *gpu_material)
 
void DRW_pointcloud_init ()
 
void DRW_pointcloud_free ()
 
static void drw_curves_ensure_dummy_vbo ()
 
static void drw_curves_cache_shgrp_attach_resources (DRWShadingGroup *shgrp, CurvesEvalCache *cache, gpu::VertBuf *point_buf)
 
static void drw_curves_cache_update_compute (CurvesEvalCache *cache, const int curves_num, gpu::VertBuf *output_buf, gpu::VertBuf *input_buf)
 
static void drw_curves_cache_update_compute (CurvesEvalCache *cache)
 
static CurvesEvalCachedrw_curves_cache_get (Curves &curves, GPUMaterial *gpu_material, int subdiv, int thickness_res)
 
static int attribute_index_in_material (GPUMaterial *gpu_material, const char *name)
 
static CurvesEvalCachecurves_cache_get (Curves &curves, GPUMaterial *gpu_material, int subdiv, int thickness_res)
 
template<typename PassT >
gpu::Batch * curves_sub_pass_setup_implementation (PassT &sub_ps, const Scene *scene, Object *ob, GPUMaterial *gpu_material)
 
static ParticleHairCachehair_particle_cache_get (Object *object, ParticleSystem *psys, ModifierData *md, GPUMaterial *gpu_material, int subdiv, int thickness_res)
 
template<typename PassT >
blender::gpu::Batch * hair_sub_pass_setup_implementation (PassT &sub_ps, const Scene *scene, Object *object, ParticleSystem *psys, ModifierData *md, GPUMaterial *gpu_material)
 
template<typename PassT >
gpu::Batch * point_cloud_sub_pass_setup_implementation (PassT &sub_ps, Object *object, GPUMaterial *gpu_material)
 
static Vector< SculptBatchsculpt_batches_get_ex (const Object *ob, const bool use_wire, const Span< pbvh::AttributeRequest > attrs)
 
Vector< SculptBatchsculpt_batches_get (const Object *ob, SculptBatchFeature features)
 
Vector< SculptBatchsculpt_batches_per_material_get (const Object *ob, Span< const GPUMaterial * > materials)
 
 ENUM_OPERATORS (SculptBatchFeature, SCULPT_BATCH_UV)
 
int subdiv_edges_per_coarse_edge (const DRWSubdivCache &cache)
 
int subdiv_verts_per_coarse_edge (const DRWSubdivCache &cache)
 
int subdiv_loose_edges_num (const MeshRenderData &mr, const DRWSubdivCache &cache)
 
int subdiv_full_vbo_size (const MeshRenderData &mr, const DRWSubdivCache &cache)
 
template<typename PassType >
PassTypevolume_world_grids_init (PassType &ps, ListBaseWrapper< GPUMaterialAttribute > &attrs)
 
template<typename PassType >
PassTypevolume_object_grids_init (PassType &ps, Object *ob, ListBaseWrapper< GPUMaterialAttribute > &attrs)
 
template<typename PassType >
PassTypedrw_volume_object_mesh_init (PassType &ps, Scene *scene, Object *ob, ListBaseWrapper< GPUMaterialAttribute > &attrs)
 
template<typename PassType >
PassTypevolume_sub_pass_implementation (PassType &ps, Scene *scene, Object *ob, GPUMaterial *gpu_material)
 
template<typename GPUType >
GPUType convert_normal (const float3 &src)
 
template<>
GPUPackedNormal convert_normal (const float3 &src)
 
template<>
short4 convert_normal (const float3 &src)
 
template<typename GPUType >
void convert_normals (Span< float3 > src, MutableSpan< GPUType > dst)
 
template<typename T >
void extract_mesh_loose_edge_data (const Span< T > vert_data, const Span< int2 > edges, const Span< int > loose_edges, MutableSpan< T > gpu_data)
 
void extract_positions (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_positions_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo, gpu::VertBuf *orco_vbo)
 
void extract_face_dots_position (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_face_dots_subdiv (const DRWSubdivCache &subdiv_cache, gpu::VertBuf &fdots_pos, gpu::VertBuf *fdots_nor, gpu::IndexBuf &fdots)
 
void extract_normals (const MeshRenderData &mr, bool use_hq, gpu::VertBuf &vbo)
 
void extract_normals_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &pos_nor, gpu::VertBuf &lnor)
 
void extract_vert_normals (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_face_dot_normals (const MeshRenderData &mr, const bool use_hq, gpu::VertBuf &vbo)
 
void extract_edge_factor (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_edge_factor_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &pos_nor, gpu::VertBuf &vbo)
 
void extract_tris (const MeshRenderData &mr, const SortedFaceData &face_sorted, MeshBatchCache &cache, gpu::IndexBuf &ibo)
 
void extract_tris_subdiv (const DRWSubdivCache &subdiv_cache, MeshBatchCache &cache, gpu::IndexBuf &ibo)
 
void extract_lines (const MeshRenderData &mr, gpu::IndexBuf *lines, gpu::IndexBuf *lines_loose, bool &no_loose_wire)
 
void extract_lines_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::IndexBuf *lines, gpu::IndexBuf *lines_loose, bool &no_loose_wire)
 
void extract_points (const MeshRenderData &mr, gpu::IndexBuf &points)
 
void extract_points_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &points)
 
void extract_edit_data (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_edit_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &vbo)
 
void extract_tangents (const MeshRenderData &mr, const MeshBatchCache &cache, const bool use_hq, gpu::VertBuf &vbo)
 
void extract_tangents_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache, gpu::VertBuf &vbo)
 
void extract_vert_index (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_edge_index (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_face_index (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_face_dot_index (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_vert_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_edge_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_face_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_weights (const MeshRenderData &mr, const MeshBatchCache &cache, gpu::VertBuf &vbo)
 
void extract_weights_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache, gpu::VertBuf &vbo)
 
void extract_face_dots (const MeshRenderData &mr, gpu::IndexBuf &face_dots)
 
void extract_face_dots_uv (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_face_dots_edituv_data (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_lines_paint_mask (const MeshRenderData &mr, gpu::IndexBuf &lines)
 
void extract_lines_paint_mask_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &lines)
 
void extract_lines_adjacency (const MeshRenderData &mr, gpu::IndexBuf &ibo, bool &r_is_manifold)
 
void extract_lines_adjacency_subdiv (const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo, bool &r_is_manifold)
 
void extract_uv_maps (const MeshRenderData &mr, const MeshBatchCache &cache, gpu::VertBuf &vbo)
 
void extract_uv_maps_subdiv (const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache, gpu::VertBuf &vbo)
 
void extract_edituv_stretch_area (const MeshRenderData &mr, gpu::VertBuf &vbo, float &tot_area, float &tot_uv_area)
 
void extract_edituv_stretch_area_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &vbo, float &tot_area, float &tot_uv_area)
 
void extract_edituv_stretch_angle (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_edituv_stretch_angle_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache, gpu::VertBuf &vbo)
 
void extract_skin_roots (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_sculpt_data (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_sculpt_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &vbo)
 
void extract_orco (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_mesh_analysis (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
static IndexMask calc_face_visibility_mesh (const MeshRenderData &mr, IndexMaskMemory &memory)
 
static void index_mask_to_ibo (const IndexMask &mask, gpu::IndexBuf &ibo)
 
static void extract_face_dots_mesh (const MeshRenderData &mr, gpu::IndexBuf &face_dots)
 
static void extract_face_dots_bm (const MeshRenderData &mr, gpu::IndexBuf &face_dots)
 
static IndexMask calc_mesh_edge_visibility (const MeshRenderData &mr, const IndexMask &mask, IndexMaskMemory &memory)
 
static uint2 edge_from_corners (const IndexRange face, const int corner)
 
static void fill_loose_lines_ibo (const MeshRenderData &mr, const IndexMask &visible, MutableSpan< uint2 > data)
 
static IndexMask calc_visible_loose_edge_indices (const MeshRenderData &mr, IndexMaskMemory &memory)
 
static void extract_lines_mesh (const MeshRenderData &mr, gpu::IndexBuf *lines, gpu::IndexBuf *lines_loose, bool &no_loose_wire)
 
static void extract_lines_bm (const MeshRenderData &mr, gpu::IndexBuf *lines, gpu::IndexBuf *lines_loose, bool &no_loose_wire)
 
static void extract_lines_loose_geom_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, const int edge_loose_offset, gpu::IndexBuf *ibo)
 
static void create_lines_for_remaining_edges (MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
 
void rotate_vector (uint3 &value)
 
void lines_adjacency_triangle (uint3 vert_tri, uint3 corner_tri, MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
 
static void calc_adjacency_bm (const MeshRenderData &mr, MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
 
static void calc_adjacency_mesh (const MeshRenderData &mr, MutableSpan< int > vert_to_corner, Map< OrderedEdge, int > &edge_hash, GPUIndexBufBuilder &elb, bool &is_manifold)
 
static IndexMask calc_vert_visibility_mesh (const MeshRenderData &mr, const IndexMask &mask, IndexMaskMemory &memory)
 
template<typename Fn >
static void process_ibo_verts_mesh (const MeshRenderData &mr, const Fn &process_vert_fn)
 
static void extract_points_mesh (const MeshRenderData &mr, gpu::IndexBuf &points)
 
template<typename Fn >
static void process_ibo_verts_bm (const MeshRenderData &mr, const Fn &process_vert_fn)
 
static void extract_points_bm (const MeshRenderData &mr, gpu::IndexBuf &points)
 
static IndexMask calc_vert_visibility_mapped_mesh (const MeshRenderData &mr, const IndexMask &mask, const Span< int > map, IndexMaskMemory &memory)
 
static void extract_points_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &points)
 
static void extract_points_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &points)
 
static void extract_tris_mesh (const MeshRenderData &mr, const SortedFaceData &face_sorted, gpu::IndexBuf &ibo)
 
static void extract_tris_bmesh (const MeshRenderData &mr, const SortedFaceData &face_sorted, gpu::IndexBuf &ibo)
 
static void create_material_subranges (const MeshRenderData &mr, const SortedFaceData &face_sorted, MeshBatchCache &cache, gpu::IndexBuf &ibo)
 
template<typename T >
T edge_factor_calc (const float3 &a, const float3 &b)
 
template<>
float edge_factor_calc< float > (const float3 &a, const float3 &b)
 
template<>
uint8_t edge_factor_calc< uint8_t > (const float3 &a, const float3 &b)
 
template<typename T >
static void extract_edge_factor_mesh (const MeshRenderData &mr, MutableSpan< T > vbo_data)
 
template<typename T >
static void extract_edge_factor_bm (const MeshRenderData &mr, MutableSpan< T > vbo_data)
 
static const GPUVertFormatget_subdiv_edge_fac_format ()
 
static gpu::VertBufbuild_poly_other_map_vbo (const DRWSubdivCache &subdiv_cache)
 
static void mesh_render_data_edge_flag (const MeshRenderData &mr, const BMEdge *eed, EditLoopData &eattr)
 
static void mesh_render_data_vert_flag (const MeshRenderData &mr, const BMVert *eve, EditLoopData &eattr)
 
static const GPUVertFormatget_edit_data_format ()
 
static void extract_edit_data_mesh (const MeshRenderData &mr, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edit_data_bm (const MeshRenderData &mr, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edit_subdiv_data_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edit_subdiv_data_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, MutableSpan< EditLoopData > vbo_data)
 
static void compute_normalize_edge_vectors (float auv[2][2], float av[2][3], const float uv[2], const float uv_prev[2], const float co[3], const float co_prev[3])
 
static short v2_to_short_angle (const float v[2])
 
static void edituv_get_edituv_stretch_angle (float auv[2][2], const float av[2][3], UVStretchAngle *r_stretch)
 
static void extract_uv_stretch_angle_bm (const MeshRenderData &mr, MutableSpan< UVStretchAngle > vbo_data)
 
static void extract_uv_stretch_angle_mesh (const MeshRenderData &mr, MutableSpan< UVStretchAngle > vbo_data)
 
static const GPUVertFormatget_edituv_stretch_angle_format_subdiv ()
 
BLI_INLINE float area_ratio_get (float area, float uvarea)
 
BLI_INLINE float area_ratio_to_stretch (float ratio, float tot_ratio)
 
static AreaInfo compute_area_ratio (const MeshRenderData &mr, MutableSpan< float > r_area_ratio)
 
template<typename GPUType >
static void extract_face_dot_normals_mesh (const MeshRenderData &mr, MutableSpan< GPUType > normals)
 
template<typename GPUType >
void extract_face_dot_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > normals)
 
static const GPUVertFormatget_fdots_pos_format ()
 
static const GPUVertFormatget_fdots_nor_format_subdiv ()
 
static void extract_face_dot_positions_mesh (const MeshRenderData &mr, MutableSpan< float3 > vbo_data)
 
static void extract_face_dot_positions_bm (const MeshRenderData &mr, MutableSpan< float3 > vbo_data)
 
static void extract_face_dots_uv_mesh (const MeshRenderData &mr, MutableSpan< float2 > vbo_data)
 
static void extract_face_dots_uv_bm (const MeshRenderData &mr, MutableSpan< float2 > vbo_data)
 
template<typename GPUType >
static void convert_normals_impl (const Span< float3 > src, MutableSpan< GPUType > dst)
 
template<>
void convert_normals (const Span< float3 > src, MutableSpan< GPUPackedNormal > normals)
 
template<>
void convert_normals (const Span< float3 > src, MutableSpan< short4 > normals)
 
template<typename GPUType >
static void extract_vert_normals (const Span< int > corner_verts, const Span< float3 > vert_normals, MutableSpan< GPUType > normals)
 
template<typename GPUType >
static void extract_face_normals (const MeshRenderData &mr, MutableSpan< GPUType > normals)
 
template<typename GPUType >
static void extract_normals_mesh (const MeshRenderData &mr, MutableSpan< GPUType > normals)
 
template<typename GPUType >
static void extract_paint_overlay_flags (const MeshRenderData &mr, MutableSpan< GPUType > normals)
 
template<typename GPUType >
static void extract_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > normals)
 
static const GPUVertFormatget_subdiv_lnor_format ()
 
static void axis_from_enum_v3 (float v[3], const char axis)
 
BLI_INLINE float overhang_remap (float fac, float min, float max, float minmax_irange)
 
static void statvis_calc_overhang (const MeshRenderData &mr, MutableSpan< float > r_overhang)
 
static void uv_from_jitter_v2 (float uv[2])
 
BLI_INLINE float thickness_remap (float fac, float min, float max, float minmax_irange)
 
static void statvis_calc_thickness (const MeshRenderData &mr, MutableSpan< float > r_thickness)
 
static bool bvh_overlap_cb (void *userdata, int index_a, int index_b, int)
 
static void statvis_calc_intersect (const MeshRenderData &mr, MutableSpan< float > r_intersect)
 
BLI_INLINE float distort_remap (float fac, float min, float, float minmax_irange)
 
static void statvis_calc_distort (const MeshRenderData &mr, MutableSpan< float > r_distort)
 
BLI_INLINE float sharp_remap (float fac, float min, float, float minmax_irange)
 
static void statvis_calc_sharp (const MeshRenderData &mr, MutableSpan< float > r_sharp)
 
static void extract_positions_mesh (const MeshRenderData &mr, MutableSpan< float3 > vbo_data)
 
static void extract_positions_bm (const MeshRenderData &mr, MutableSpan< float3 > vbo_data)
 
static const GPUVertFormatget_normals_format ()
 
static const GPUVertFormatget_custom_normals_format ()
 
static void extract_vertex_flags (const MeshRenderData &mr, char *flags)
 
static void extract_loose_positions_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
 
static const GPUVertFormatget_sculpt_data_format ()
 
static MutableSpan< intinit_vbo_data (gpu::VertBuf &vbo, const int size)
 
static void extract_vert_index_mesh (const MeshRenderData &mr, MutableSpan< int > vbo_data)
 
static void extract_vert_index_bm (const MeshRenderData &mr, MutableSpan< int > vbo_data)
 
static void extract_edge_index_mesh (const MeshRenderData &mr, MutableSpan< int > vbo_data)
 
static void extract_edge_index_bm (const MeshRenderData &mr, MutableSpan< int > vbo_data)
 
static void extract_face_index_mesh (const MeshRenderData &mr, MutableSpan< int > vbo_data)
 
static void extract_face_index_bm (const MeshRenderData &mr, MutableSpan< int > vbo_data)
 
static void extract_vert_idx_loose_geom_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
 
static void extract_edge_idx_loose_geom_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
 
static void extract_tan_init_common (const MeshRenderData &mr, const MeshBatchCache &cache, GPUVertFormat *format, GPUVertCompType comp_type, GPUVertFetchMode fetch_mode, CustomData *r_loop_data, int *r_v_len, int *r_tan_len, char r_tangent_names[MAX_MTFACE][MAX_CUSTOMDATA_LAYER_NAME], bool *r_use_orco_tan)
 
static const GPUVertFormatget_coarse_tan_format ()
 
static bool mesh_extract_uv_format_init (GPUVertFormat *format, const MeshBatchCache &cache, const CustomData *cd_ldata, const eMRExtractType extract_type, uint32_t &r_uv_layers)
 
static void extract_vert_normals_mesh (const MeshRenderData &mr, MutableSpan< GPUPackedNormal > vbo_data)
 
static void extract_vert_normals_bm (const MeshRenderData &mr, MutableSpan< GPUPackedNormal > vbo_data)
 
static float evaluate_vertex_weight (const MDeformVert *dvert, const DRW_MeshWeightState *wstate)
 
static void extract_weights_mesh (const MeshRenderData &mr, const DRW_MeshWeightState &weight_state, MutableSpan< float > vbo_data)
 
static void extract_weights_bm (const MeshRenderData &mr, const DRW_MeshWeightState &weight_state, MutableSpan< float > vbo_data)
 
static void test_draw_pass_all_commands ()
 
static void test_draw_pass_sub_ordering ()
 
static void test_draw_pass_simple_draw ()
 
static void test_draw_pass_multi_draw ()
 
static void test_draw_pass_sortable ()
 
static void test_draw_resource_id_gen ()
 
static void test_draw_visibility ()
 
static void test_draw_manager_sync ()
 
static void test_eevee_shadow_shift_clear ()
 
static void test_eevee_shadow_shift ()
 
static void test_eevee_shadow_tag_update ()
 
static void test_eevee_shadow_free ()
 
static void test_eevee_shadow_defrag ()
 
static void test_eevee_shadow_alloc ()
 
static void test_eevee_shadow_finalize ()
 
static void test_eevee_shadow_tile_packing ()
 
static void test_eevee_shadow_tilemap_amend ()
 
static void test_eevee_shadow_page_mask_ex (int max_view_per_tilemap)
 
static void test_eevee_shadow_page_mask ()
 
static void test_eevee_surfel_list ()
 
static void test_eevee_lut_gen ()
 
Generic
void DRW_vertbuf_create_wiredata (blender::gpu::VertBuf *vbo, const int vert_len)
 
Garbage Collection
void DRW_batch_cache_free_old (Object *ob, int ctime)
 
void DRW_mesh_batch_cache_free_old (Mesh *mesh, int ctime)
 
void DRW_curves_batch_cache_free_old (Curves *curves, int ctime)
 
void DRW_pointcloud_batch_cache_free_old (PointCloud *pointcloud, int ctime)
 
Sbuffer stroke batches.
void DRW_cache_gpencil_sbuffer_clear (Object *ob)
 
Extract Loop
void mesh_buffer_cache_create_requested (TaskGraph &task_graph, MeshBatchCache &cache, MeshBufferCache &mbc, Object &object, Mesh &mesh, bool is_editmode, bool is_paint_mode, bool edit_mode_active, const float4x4 &object_to_world, bool do_final, bool do_uvedit, const Scene &scene, const ToolSettings *ts, bool use_hide)
 
static bool any_attr_requested (const MeshBufferList &buffers)
 
Subdivision Extract Loop
void mesh_buffer_cache_create_requested_subdiv (MeshBatchCache &cache, MeshBufferCache &mbc, DRWSubdivCache &subdiv_cache, MeshRenderData &mr)
 
Polygons sorted per material

Contains face indices sorted based on their material.

static void accumululate_material_counts_bm (const BMesh &bm, threading::EnumerableThreadSpecific< Array< int > > &all_tri_counts)
 
static void accumululate_material_counts_mesh (const MeshRenderData &mr, threading::EnumerableThreadSpecific< Array< int > > &all_tri_counts)
 
static Array< intmesh_render_data_mat_tri_len_build (const MeshRenderData &mr)
 
static Array< intcalc_face_tri_starts_bmesh (const MeshRenderData &mr, MutableSpan< int > material_tri_starts)
 
static bool mesh_is_single_material (const OffsetIndices< int > material_tri_starts)
 
static std::optional< Array< int > > calc_face_tri_starts_mesh (const MeshRenderData &mr, MutableSpan< int > material_tri_starts)
 
static SortedFaceData mesh_render_data_faces_sorted_build (const MeshRenderData &mr)
 
const SortedFaceDatamesh_render_data_faces_sorted_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
 
Mesh/BMesh Interface (indirect, partially cached access to complex data).
const Mesheditmesh_final_or_this (const Object &object, const Mesh &mesh)
 
const CustomDatamesh_cd_ldata_get_from_mesh (const Mesh &mesh)
 
const CustomDatamesh_cd_pdata_get_from_mesh (const Mesh &mesh)
 
const CustomDatamesh_cd_edata_get_from_mesh (const Mesh &mesh)
 
const CustomDatamesh_cd_vdata_get_from_mesh (const Mesh &mesh)
 
static bool bm_edge_is_sharp (const BMEdge *const &edge)
 
static bool bm_face_is_sharp (const BMFace *const &face)
 
static bke::MeshNormalDomain bmesh_normals_domain (BMesh *bm)
 
void mesh_render_data_update_corner_normals (MeshRenderData &mr)
 
void mesh_render_data_update_face_normals (MeshRenderData &mr)
 
static void retrieve_active_attribute_names (MeshRenderData &mr, const Object &object, const Mesh &mesh)
 
std::unique_ptr< MeshRenderDatamesh_render_data_create (Object &object, Mesh &mesh, const bool is_editmode, const bool is_paint_mode, const bool edit_mode_active, const float4x4 &object_to_world, const bool do_final, const bool do_uvedit, const bool use_hide, const ToolSettings *ts)
 
Expose via BKE callbacks
void DRW_curve_batch_cache_dirty_tag (Curve *cu, int mode)
 
void DRW_curve_batch_cache_validate (Curve *cu)
 
void DRW_curve_batch_cache_free (Curve *cu)
 
void DRW_mesh_batch_cache_dirty_tag (Mesh *mesh, eMeshBatchDirtyMode mode)
 
void DRW_mesh_batch_cache_validate (Object &object, Mesh &mesh)
 
void DRW_mesh_batch_cache_free (void *batch_cache)
 
void DRW_lattice_batch_cache_dirty_tag (Lattice *lt, int mode)
 
void DRW_lattice_batch_cache_validate (Lattice *lt)
 
void DRW_lattice_batch_cache_free (Lattice *lt)
 
void DRW_particle_batch_cache_dirty_tag (ParticleSystem *psys, int mode)
 
void DRW_particle_batch_cache_free (ParticleSystem *psys)
 
void DRW_gpencil_batch_cache_dirty_tag (bGPdata *gpd)
 
void DRW_gpencil_batch_cache_free (bGPdata *gpd)
 
void DRW_curves_batch_cache_dirty_tag (Curves *curves, int mode)
 
void DRW_curves_batch_cache_validate (Curves *curves)
 
void DRW_curves_batch_cache_free (Curves *curves)
 
void DRW_pointcloud_batch_cache_dirty_tag (PointCloud *pointcloud, int mode)
 
void DRW_pointcloud_batch_cache_validate (PointCloud *pointcloud)
 
void DRW_pointcloud_batch_cache_free (PointCloud *pointcloud)
 
void DRW_volume_batch_cache_dirty_tag (Volume *volume, int mode)
 
void DRW_volume_batch_cache_validate (Volume *volume)
 
void DRW_volume_batch_cache_free (Volume *volume)
 
void DRW_grease_pencil_batch_cache_dirty_tag (GreasePencil *grase_pencil, int mode)
 
void DRW_grease_pencil_batch_cache_validate (GreasePencil *grase_pencil)
 
void DRW_grease_pencil_batch_cache_free (GreasePencil *grase_pencil)
 
Curve
void DRW_curve_batch_cache_create_requested (Object *ob, const Scene *scene)
 
int DRW_curve_material_count_get (const Curve *cu)
 
blender::gpu::Batch * DRW_curve_batch_cache_get_wire_edge (Curve *cu)
 
blender::gpu::Batch * DRW_curve_batch_cache_get_wire_edge_viewer_attribute (Curve *cu)
 
blender::gpu::Batch * DRW_curve_batch_cache_get_normal_edge (Curve *cu)
 
blender::gpu::Batch * DRW_curve_batch_cache_get_edit_edges (Curve *cu)
 
blender::gpu::Batch * DRW_curve_batch_cache_get_edit_verts (Curve *cu)
 
Lattice
blender::gpu::Batch * DRW_lattice_batch_cache_get_all_edges (Lattice *lt, bool use_weight, int actdef)
 
blender::gpu::Batch * DRW_lattice_batch_cache_get_all_verts (Lattice *lt)
 
blender::gpu::Batch * DRW_lattice_batch_cache_get_edit_verts (Lattice *lt)
 
Curves
int DRW_curves_material_count_get (const Curves *curves)
 
gpu::VertBuf ** DRW_curves_texture_for_evaluated_attribute (Curves *curves, const char *name, bool *r_is_point_domain)
 
blender::gpu::Batch * DRW_curves_batch_cache_get_edit_points (Curves *curves)
 
blender::gpu::Batch * DRW_curves_batch_cache_get_sculpt_curves_cage (Curves *curves)
 
blender::gpu::Batch * DRW_curves_batch_cache_get_edit_curves_handles (Curves *curves)
 
blender::gpu::Batch * DRW_curves_batch_cache_get_edit_curves_lines (Curves *curves)
 
void DRW_curves_batch_cache_create_requested (Object *ob)
 
PointCloud
int DRW_pointcloud_material_count_get (const PointCloud *pointcloud)
 
gpu::VertBufDRW_pointcloud_position_and_radius_buffer_get (Object *ob)
 
gpu::VertBuf ** DRW_pointcloud_evaluated_attribute (PointCloud *pointcloud, const char *name)
 
blender::gpu::Batch * DRW_pointcloud_batch_cache_get_dots (Object *ob)
 
void DRW_pointcloud_batch_cache_create_requested (Object *ob)
 
Volume
int DRW_volume_material_count_get (const Volume *volume)
 
blender::gpu::Batch * DRW_volume_batch_cache_get_wireframes_face (Volume *volume)
 
blender::gpu::Batch * DRW_volume_batch_cache_get_selection_surface (Volume *volume)
 
Mesh
void DRW_mesh_batch_cache_create_requested (TaskGraph &task_graph, Object &ob, Mesh &mesh, const Scene &scene, bool is_paint_mode, bool use_hide)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_all_verts (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_all_edges (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_loose_edges (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edge_detection (Mesh &mesh, bool *r_is_manifold)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface_edges (Object &object, Mesh &mesh)
 
blender::gpu::Batch ** DRW_mesh_batch_cache_get_surface_shaded (Object &object, Mesh &mesh, GPUMaterial **gpumat_array, uint gpumat_array_len)
 
blender::gpu::Batch ** DRW_mesh_batch_cache_get_surface_texpaint (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface_texpaint_single (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface_vertpaint (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface_sculpt (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface_weights (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_sculpt_overlays (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_surface_viewer_attribute (Mesh &mesh)
 
Edit-Mesh Drawing
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_triangles (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_vertices (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_edges (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_vert_normals (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_loop_normals (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_facedots (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_skin_roots (Mesh &mesh)
 
Edit-mesh Selection
blender::gpu::Batch * DRW_mesh_batch_cache_get_triangles_with_select_id (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_facedots_with_select_id (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edges_with_select_id (Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_verts_with_select_id (Mesh &mesh)
 
Object Mode Wireframe Overlays
blender::gpu::Batch * DRW_mesh_batch_cache_get_wireframes_face (Mesh &mesh)
 
Edit-mesh UV Editor
blender::gpu::Batch * DRW_mesh_batch_cache_get_edituv_faces_stretch_area (Object &object, Mesh &mesh, float **tot_area, float **tot_uv_area)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edituv_faces_stretch_angle (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edituv_faces (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edituv_edges (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edituv_verts (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edituv_facedots (Object &object, Mesh &mesh)
 
For Image UV Editor
blender::gpu::Batch * DRW_mesh_batch_cache_get_uv_edges (Object &object, Mesh &mesh)
 
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_mesh_analysis (Mesh &mesh)
 
Particles
blender::gpu::Batch * DRW_particles_batch_cache_get_hair (Object *object, ParticleSystem *psys, ModifierData *md)
 
blender::gpu::Batch * DRW_particles_batch_cache_get_dots (Object *object, ParticleSystem *psys)
 
blender::gpu::Batch * DRW_particles_batch_cache_get_edit_strands (Object *object, ParticleSystem *psys, PTCacheEdit *edit, bool use_weight)
 
blender::gpu::Batch * DRW_particles_batch_cache_get_edit_inner_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
 
blender::gpu::Batch * DRW_particles_batch_cache_get_edit_tip_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
 
Private Curve Cache API
static void curve_create_curves_pos (CurveRenderData *rdata, gpu::VertBuf *vbo_curves_pos)
 
static void curve_create_attribute (CurveRenderData *rdata, gpu::VertBuf &vbo_attr)
 
static void curve_create_curves_lines (CurveRenderData *rdata, gpu::IndexBuf *ibo_curve_lines)
 
static void curve_create_edit_curves_nor (CurveRenderData *rdata, gpu::VertBuf &vbo_curves_nor, const Scene *scene)
 
static uint8_t beztriple_vflag_get (CurveRenderData *rdata, uint8_t flag, uint8_t col_id, int v_idx, int nu_id, bool handle_point, const bool handle_selected)
 
static uint8_t bpoint_vflag_get (CurveRenderData *rdata, uint8_t flag, int v_idx, int nu_id, int u)
 
static void curve_create_edit_data_and_handles (CurveRenderData *rdata, gpu::VertBuf *vbo_pos, gpu::VertBuf *vbo_data, gpu::IndexBuf *ibo_edit_verts_points, gpu::IndexBuf *ibo_edit_lines)
 
Internal Utilities
static void gpencil_batch_cache_clear (GpencilBatchCache *cache)
 
static bool grease_pencil_batch_cache_valid (const GreasePencil &grease_pencil)
 
static GreasePencilBatchCachegrease_pencil_batch_cache_init (GreasePencil &grease_pencil)
 
static void grease_pencil_batch_cache_clear (GreasePencil &grease_pencil)
 
static GreasePencilBatchCachegrease_pencil_batch_cache_get (GreasePencil &grease_pencil)
 
Vertex Formats

Used for data transfer from OpenSubdiv, and for data processing on our side.

static GPUVertFormatgrease_pencil_stroke_format ()
 
static GPUVertFormatgrease_pencil_color_format ()
 
static const GPUVertFormatget_uvs_format ()
 
static const GPUVertFormatget_patch_array_format ()
 
static const GPUVertFormatget_patch_handle_format ()
 
static const GPUVertFormatget_quadtree_format ()
 
static const GPUVertFormatget_patch_param_format ()
 
static const GPUVertFormatget_patch_index_format ()
 
static const GPUVertFormatget_subdiv_vertex_format ()
 
MINLINE CompressedPatchCoord make_patch_coord (int ptex_face_index, float u, float v)
 
static const GPUVertFormatget_blender_patch_coords_format ()
 
static const GPUVertFormatget_origindex_format ()
 
const GPUVertFormatdraw_subdiv_get_pos_nor_format ()
 
Vertex Buffers
BLI_INLINE int32_t pack_rotation_aspect_hardness (float rot, float asp, float softness)
 
static void copy_transformed_positions (const Span< float3 > src_positions, const IndexRange range, const float4x4 &transform, MutableSpan< float3 > dst_positions)
 
static bool grease_pencil_batch_cache_is_edit_discarded (GreasePencilBatchCache *cache)
 
static void grease_pencil_weight_batch_ensure (Object &object, const GreasePencil &grease_pencil, const Scene &scene)
 
static IndexMask grease_pencil_get_visible_nurbs_points (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
 
static IndexMask grease_pencil_get_visible_nurbs_curves (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
 
static IndexMask grease_pencil_get_visible_non_nurbs_curves (Object &object, const bke::greasepencil::Drawing &drawing, IndexMaskMemory &memory)
 
static void grease_pencil_cache_add_nurbs (Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, IndexMaskMemory &memory, const VArray< float > &selected_point, const float4x4 &layer_space_to_object_space, MutableSpan< float3 > edit_line_points, MutableSpan< float > edit_line_selection, int *r_drawing_line_start_offset, int *r_total_line_ids_num)
 
static void index_buf_add_line_points (Object &object, const bke::greasepencil::Drawing &drawing, int, GPUIndexBufBuilder *elb, IndexMaskMemory &memory, int *r_drawing_line_start_offset)
 
static void index_buf_add_nurbs_lines (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, GPUIndexBufBuilder *elb, IndexMaskMemory &memory, int *r_drawing_line_start_offset)
 
static void index_buf_add_bezier_lines (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, GPUIndexBufBuilder *elb, IndexMaskMemory &memory, int *r_drawing_line_start_offset)
 
static void index_buf_add_points (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, GPUIndexBufBuilder *epb, IndexMaskMemory &memory, int *r_drawing_start_offset)
 
static void index_buf_add_bezier_line_points (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, GPUIndexBufBuilder *epb, IndexMaskMemory &memory, int *r_drawing_start_offset)
 
static void grease_pencil_edit_batch_ensure (Object &object, const GreasePencil &grease_pencil, const Scene &scene)
 
template<typename T >
static VArray< Tattribute_interpolate (const VArray< T > &input, const bke::CurvesGeometry &curves)
 
static void grease_pencil_geom_batch_ensure (Object &object, const GreasePencil &grease_pencil, const Scene &scene)
 
static void grease_pencil_wire_batch_ensure (Object &object, const GreasePencil &grease_pencil, const Scene &scene)
 
Dependencies between buffer and batch
static constexpr DRWBatchFlag batches_that_use_buffer (const int buffer_index)
 
static void mesh_batch_cache_discard_surface_batches (MeshBatchCache &cache)
 
static void mesh_batch_cache_clear (MeshBatchCache &cache)
 
static void mesh_batch_cache_discard_batch (MeshBatchCache &cache, const DRWBatchFlag batch_map)
 
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)
 
static void mesh_cd_calc_edit_uv_layer (const Mesh &, DRW_MeshCDMask *cd_used)
 
static void mesh_cd_calc_active_uv_layer (const Object &object, const Mesh &mesh, DRW_MeshCDMask &cd_used)
 
static void mesh_cd_calc_active_mask_uv_layer (const Object &object, const Mesh &mesh, DRW_MeshCDMask &cd_used)
 
static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers (const Object &object, const Mesh &mesh, const GPUMaterial *const *gpumat_array, int gpumat_array_len, DRW_Attributes *attributes)
 
Vertex Group Selection
static void drw_mesh_weight_state_clear (DRW_MeshWeightState *wstate)
 
static void drw_mesh_weight_state_copy (DRW_MeshWeightState *wstate_dst, const 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 DRW_MeshWeightState *a, const DRW_MeshWeightState *b)
 
static void drw_mesh_weight_state_extract (Object &ob, Mesh &mesh, const ToolSettings &ts, bool paint_mode, DRW_MeshWeightState *wstate)
 
Mesh gpu::Batch Cache
BLI_INLINE void mesh_batch_cache_add_request (MeshBatchCache &cache, DRWBatchFlag new_flag)
 
static bool mesh_batch_cache_valid (Object &object, Mesh &mesh)
 
static void mesh_batch_cache_init (Object &object, Mesh &mesh)
 
static MeshBatchCachemesh_batch_cache_get (Mesh &mesh)
 
static void mesh_batch_cache_check_vertex_group (MeshBatchCache &cache, const DRW_MeshWeightState *wstate)
 
static void mesh_batch_cache_request_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)
 
static void mesh_buffer_list_clear (MeshBufferList *mbuflist)
 
static void mesh_buffer_cache_clear (MeshBufferCache *mbc)
 
static void mesh_batch_cache_free_subdiv_cache (MeshBatchCache &cache)
 
Public API
static void texpaint_request_active_uv (MeshBatchCache &cache, Object &object, Mesh &mesh)
 
static void request_active_and_default_color_attributes (const Object &object, const Mesh &mesh, DRW_Attributes &attributes)
 
void DRW_mesh_get_attributes (const Object &object, const Mesh &mesh, const GPUMaterial *const *gpumat_array, int gpumat_array_len, DRW_Attributes *r_attrs, DRW_MeshCDMask *r_cd_needed)
 
UV Image editor API
static void edituv_request_active_uv (MeshBatchCache &cache, Object &object, Mesh &mesh)
 
Grouped batch generation
static void drw_add_attributes_vbo (gpu::Batch *batch, MeshBufferList *mbuflist, DRW_Attributes *attr_used)
 
static void drw_mesh_batch_cache_check_available (TaskGraph &task_graph, Mesh &mesh)
 
gpu::Batch cache management
static PointCloudBatchCachepointcloud_batch_cache_get (PointCloud &pointcloud)
 
static bool pointcloud_batch_cache_valid (PointCloud &pointcloud)
 
static void pointcloud_batch_cache_init (PointCloud &pointcloud)
 
static void pointcloud_discard_attributes (PointCloudBatchCache &cache)
 
static void pointcloud_batch_cache_clear (PointCloud &pointcloud)
 
Private API
gpu::VertBufpointcloud_position_and_radius_get (PointCloud *pointcloud)
 
gpu::Batch ** pointcloud_surface_shaded_get (PointCloud *pointcloud, GPUMaterial **gpu_materials, int mat_len)
 
gpu::Batch * pointcloud_surface_get (PointCloud *pointcloud)
 
Utilities to initialize a OpenSubdiv_Buffer for a gpu::VertBuf.
static void vertbuf_bind_gpu (const OpenSubdiv_Buffer *buffer)
 
static void * vertbuf_alloc (const OpenSubdiv_Buffer *interface, const uint len)
 
static void vertbuf_device_alloc (const OpenSubdiv_Buffer *interface, const uint len)
 
static void vertbuf_wrap_device_handle (const OpenSubdiv_Buffer *interface, uint64_t handle)
 
static void vertbuf_update_data (const OpenSubdiv_Buffer *interface, uint start, uint len, const void *data)
 
static void opensubdiv_gpu_buffer_init (OpenSubdiv_Buffer *buffer_interface, gpu::VertBuf *vertbuf)
 
static gpu::VertBufcreate_buffer_and_interface (OpenSubdiv_Buffer *interface, const GPUVertFormat &format)
 
Utilities to build a gpu::VertBuf from an origindex buffer.
void draw_subdiv_init_origindex_buffer (gpu::VertBuf &buffer, int32_t *vert_origindex, uint num_loops, uint loose_len)
 
gpu::VertBufdraw_subdiv_build_origindex_buffer (int *vert_origindex, uint num_loops)
 
Utilities for DRWPatchMap.
static void draw_patch_map_build (DRWPatchMap *gpu_patch_map, bke::subdiv::Subdiv *subdiv)
 
static void draw_patch_map_free (DRWPatchMap *gpu_patch_map)
 
DRWSubdivCache

This holds the various buffers used to evaluate and render subdivision through OpenGL.

static bool draw_subdiv_cache_need_face_data (const DRWSubdivCache &cache)
 
static void draw_subdiv_cache_free_material_data (DRWSubdivCache &cache)
 
static void draw_subdiv_free_edit_mode_cache (DRWSubdivCache &cache)
 
void draw_subdiv_cache_free (DRWSubdivCache &cache)
 
static uint32_t compute_coarse_face_flag_bm (BMFace *f, BMFace *efa_act)
 
static void draw_subdiv_cache_extra_coarse_face_data_bm (BMesh *bm, BMFace *efa_act, MutableSpan< uint32_t > flags_data)
 
static void draw_subdiv_cache_extra_coarse_face_data_mesh (const MeshRenderData &mr, const Mesh *mesh, MutableSpan< uint32_t > flags_data)
 
static void draw_subdiv_cache_extra_coarse_face_data_mapped (const Mesh *mesh, BMesh *bm, MeshRenderData &mr, MutableSpan< uint32_t > flags_data)
 
static void draw_subdiv_cache_update_extra_coarse_face_data (DRWSubdivCache &cache, const Mesh *mesh, MeshRenderData &mr)
 
static DRWSubdivCachemesh_batch_cache_ensure_subdiv_cache (MeshBatchCache &mbc)
 
static void draw_subdiv_invalidate_evaluator_for_orco (bke::subdiv::Subdiv *subdiv, const Mesh *mesh)
 
Subdivision grid traversal.

Traverse the uniform subdivision grid over coarse faces and gather useful information for building the draw buffers on the GPU. We primarily gather the patch coordinates for all subdivision faces, as well as the original coarse indices for each subdivision element (vertex, face, or edge) which directly maps to its coarse counterpart (note that all subdivision faces map to a coarse face). This information will then be cached in #DRWSubdivCache for subsequent reevaluations, as long as the topology does not change.

static bool draw_subdiv_topology_info_cb (const bke::subdiv::ForeachContext *foreach_context, const int num_verts, const int num_edges, const int num_loops, const int num_faces, const int *subdiv_face_offset)
 
static void draw_subdiv_vertex_corner_cb (const bke::subdiv::ForeachContext *foreach_context, void *, const int, const float, const float, const int coarse_vertex_index, const int, const int, const int subdiv_vertex_index)
 
static void draw_subdiv_vertex_edge_cb (const bke::subdiv::ForeachContext *, void *, const int, const float, const float, const int, const int, const int, const int)
 
static void draw_subdiv_edge_cb (const bke::subdiv::ForeachContext *foreach_context, void *, const int coarse_edge_index, const int subdiv_edge_index, const bool, const int, const int)
 
static void draw_subdiv_loop_cb (const bke::subdiv::ForeachContext *foreach_context, void *, const int ptex_face_index, const float u, const float v, const int, const int coarse_face_index, const int, const int subdiv_loop_index, const int subdiv_vertex_index, const int subdiv_edge_index)
 
static void draw_subdiv_foreach_callbacks (bke::subdiv::ForeachContext *foreach_context)
 
static void do_subdiv_traversal (DRWCacheBuildingContext *cache_building_context, bke::subdiv::Subdiv *subdiv)
 
static gpu::VertBufgpu_vertbuf_create_from_format (const GPUVertFormat &format, uint len)
 
static void build_vertex_face_adjacency_maps (DRWSubdivCache &cache)
 
static bool draw_subdiv_build_cache (DRWSubdivCache &cache, bke::subdiv::Subdiv *subdiv, const Mesh *mesh_eval, const SubsurfRuntimeData *runtime_data)
 
DRWSubdivUboStorage.

Common uniforms for the various shaders.

static void draw_subdiv_init_ubo_storage (const DRWSubdivCache &cache, DRWSubdivUboStorage *ubo, const int src_offset, const int dst_offset, const uint total_dispatch_size, const bool has_sculpt_mask, const uint edge_loose_offset)
 
static void draw_subdiv_ubo_update_and_bind (const DRWSubdivCache &cache, GPUShader *shader, const int src_offset, const int dst_offset, const uint total_dispatch_size, const bool has_sculpt_mask=false, const uint edge_loose_offset=0)
 
DRWState to GPU state conversion
static eGPUWriteMask to_write_mask (DRWState state)
 
static eGPUFaceCullTest to_face_cull_test (DRWState state)
 
static eGPUDepthTest to_depth_test (DRWState state)
 
static eGPUStencilOp to_stencil_op (DRWState state)
 
static eGPUStencilTest to_stencil_test (DRWState state)
 
static eGPUBlend to_blend (DRWState state)
 
static eGPUProvokingVertex to_provoking_vertex (DRWState state)
 
Texture
static Imageas_image (GPUTexture *tex)
 
static Image ** as_image (GPUTexture **tex)
 
static GPUTexture * as_texture (Image *img)
 
static GPUTexture ** as_texture (Image **img)
 
Extract Edit Flag Utils
void mesh_render_data_face_flag (const MeshRenderData &mr, const BMFace *efa, const BMUVOffsets offsets, EditLoopData &eattr)
 
void mesh_render_data_loop_flag (const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets offsets, EditLoopData &eattr)
 
void mesh_render_data_loop_edge_flag (const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets offsets, EditLoopData &eattr)
 
Extract Edit UV Data / Flags
void extract_edituv_data (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
void extract_edituv_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &vbo)
 
static const GPUVertFormatedituv_data_format ()
 
static void extract_edituv_data_bm (const MeshRenderData &mr, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edituv_data_mesh (const MeshRenderData &mr, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edituv_data_iter_subdiv_bm (const MeshRenderData &mr, const BMUVOffsets offsets, const Span< int > subdiv_loop_vert_index, const Span< int > subdiv_loop_edge_index, const int subdiv_quad_index, const BMFace *coarse_quad, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edituv_subdiv_data_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, MutableSpan< EditLoopData > vbo_data)
 
static void extract_edituv_subdiv_data_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, MutableSpan< EditLoopData > vbo_data)
 
Extract Edit UV Triangles Indices
void extract_edituv_tris (const MeshRenderData &mr, gpu::IndexBuf &ibo)
 
void extract_edituv_tris_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo)
 
bool skip_bm_face (const BMFace &face, const bool sync_selection)
 
static void extract_edituv_tris_bm (const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_tris_mesh (const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_tris_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_tris_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
 
Extract Edit UV Line Indices around faces
void extract_edituv_lines (const MeshRenderData &mr, gpu::IndexBuf &ibo)
 
void extract_edituv_lines_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo)
 
static void extract_edituv_lines_bm (const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_lines_mesh (const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_lines_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_lines_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
 
Extract Edit UV Points Indices
void extract_edituv_points (const MeshRenderData &mr, gpu::IndexBuf &ibo)
 
void extract_edituv_points_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo)
 
static void extract_edituv_points_bm (const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_points_mesh (const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_points_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
 
static void extract_edituv_points_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
 
Extract Edit UV Face-dots Indices
void extract_edituv_face_dots (const MeshRenderData &mr, gpu::IndexBuf &ibo)
 
static void extract_edituv_face_dots_bm (const MeshRenderData &mr, const bool sync_selection, gpu::IndexBuf &ibo)
 
static void extract_edituv_face_dots_mesh (const MeshRenderData &mr, const bool sync_selection, gpu::IndexBuf &ibo)
 
Extract Attributes
void extract_attributes (const MeshRenderData &mr, const Span< DRW_AttributeRequest > requests, const Span< gpu::VertBuf * > vbos)
 
void extract_attributes_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const Span< DRW_AttributeRequest > requests, const Span< gpu::VertBuf * > vbos)
 
void extract_attr_viewer (const MeshRenderData &mr, gpu::VertBuf &vbo)
 
static void init_vbo_for_attribute (const MeshRenderData &mr, gpu::VertBuf &vbo, const DRW_AttributeRequest &request, bool build_on_device, uint32_t len)
 
template<typename T >
static void extract_data_mesh_mapped_corner (const Span< T > attribute, const Span< int > indices, gpu::VertBuf &vbo)
 
template<typename T >
static void extract_data_mesh_face (const OffsetIndices< int > faces, const Span< T > attribute, gpu::VertBuf &vbo)
 
template<typename T >
static void extract_data_bmesh_vert (const BMesh &bm, const int cd_offset, gpu::VertBuf &vbo)
 
template<typename T >
static void extract_data_bmesh_edge (const BMesh &bm, const int cd_offset, gpu::VertBuf &vbo)
 
template<typename T >
static void extract_data_bmesh_face (const BMesh &bm, const int cd_offset, gpu::VertBuf &vbo)
 
template<typename T >
static void extract_data_bmesh_loop (const BMesh &bm, const int cd_offset, gpu::VertBuf &vbo)
 
static const CustomDataget_custom_data_for_domain (const BMesh &bm, bke::AttrDomain domain)
 
static void extract_attribute (const MeshRenderData &mr, const DRW_AttributeRequest &request, gpu::VertBuf &vbo)
 

Variables

static uint DUMMY_ID
 
static GPUShaderg_subdiv_shaders [NUM_SHADERS]
 
static GPUShaderg_subdiv_custom_data_shaders [SHADER_CUSTOM_DATA_INTERP_MAX_DIMENSIONS][GPU_COMP_MAX]
 
static OpenSubdiv_EvaluatorCacheg_evaluator_cache = nullptr
 
static LinkNodegpu_subdiv_free_queue = nullptr
 
static ThreadMutex gpu_subdiv_queue_mutex = BLI_MUTEX_INITIALIZER
 
static gpu::VertBufg_dummy_vbo = nullptr
 
static DRWPassg_tf_pass
 
static PassSimpleg_pass = nullptr
 
static PassSimpleg_pass = nullptr
 
static gpu::VertBufg_dummy_vbo = nullptr
 

For Direct Data Access

enum  {
  VFLAG_VERT_ACTIVE = 1 << 0 , VFLAG_VERT_SELECTED = 1 << 1 , VFLAG_VERT_SELECTED_BEZT_HANDLE = 1 << 2 , VFLAG_EDGE_ACTIVE = 1 << 3 ,
  VFLAG_EDGE_SELECTED = 1 << 4 , VFLAG_EDGE_SEAM = 1 << 5 , VFLAG_EDGE_SHARP = 1 << 6 , VFLAG_EDGE_FREESTYLE = 1 << 7 ,
  VFLAG_VERT_GPENCIL_BEZT_HANDLE = 1 << 30
}
 
enum  {
  VFLAG_FACE_ACTIVE = 1 << 0 , VFLAG_FACE_SELECTED = 1 << 1 , VFLAG_FACE_FREESTYLE = 1 << 2 , VFLAG_VERT_UV_SELECT = 1 << 3 ,
  VFLAG_VERT_UV_PINNED = 1 << 4 , VFLAG_EDGE_UV_SELECT = 1 << 5 , VFLAG_FACE_UV_ACTIVE = 1 << 6 , VFLAG_FACE_UV_SELECT = 1 << 7
}
 
gpu::VertBufDRW_mesh_batch_cache_pos_vertbuf_get (Mesh &mesh)
 
int DRW_mesh_material_count_get (const Object &object, const Mesh &mesh)
 

Mesh Render Data

enum  eMRExtractType { MR_EXTRACT_BMESH , MR_EXTRACT_MESH }
 
BLI_INLINE BMFacebm_original_face_get (const MeshRenderData &mr, int idx)
 
BLI_INLINE BMEdgebm_original_edge_get (const MeshRenderData &mr, int idx)
 
BLI_INLINE BMVertbm_original_vert_get (const MeshRenderData &mr, int idx)
 
BLI_INLINE const floatbm_vert_co_get (const MeshRenderData &mr, const BMVert *eve)
 
BLI_INLINE const floatbm_vert_no_get (const MeshRenderData &mr, const BMVert *eve)
 
BLI_INLINE const floatbm_face_no_get (const MeshRenderData &mr, const BMFace *efa)
 

PointCloud extraction

static const uint half_octahedron_tris [4][3]
 
static void pointcloud_extract_indices (const PointCloud &pointcloud, PointCloudBatchCache &cache)
 
static void pointcloud_extract_position_and_radius (const PointCloud &pointcloud, PointCloudBatchCache &cache)
 
static void pointcloud_extract_attribute (const PointCloud &pointcloud, PointCloudBatchCache &cache, const DRW_AttributeRequest &request, int index)
 

Typedef Documentation

◆ CurvesInfosBuf

◆ ObjectBoundsBuf

◆ ObjectInfosBuf

Definition at line 31 of file draw_view.hh.

◆ PassMain

◆ PassSimple

◆ ShadowPageCacheBuf

◆ ShadowTileDataBuf

◆ VisibilityBuf

Definition at line 32 of file draw_view.hh.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DRW_MESH_WEIGHT_STATE_MULTIPAINT 
DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE 
DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE 

Definition at line 47 of file draw_cache_extract.hh.

◆ anonymous enum

anonymous enum
Enumerator
VFLAG_VERT_ACTIVE 
VFLAG_VERT_SELECTED 
VFLAG_VERT_SELECTED_BEZT_HANDLE 
VFLAG_EDGE_ACTIVE 
VFLAG_EDGE_SELECTED 
VFLAG_EDGE_SEAM 
VFLAG_EDGE_SHARP 
VFLAG_EDGE_FREESTYLE 
VFLAG_VERT_GPENCIL_BEZT_HANDLE 

Definition at line 288 of file draw_cache_impl.hh.

◆ anonymous enum

anonymous enum
Enumerator
VFLAG_FACE_ACTIVE 
VFLAG_FACE_SELECTED 
VFLAG_FACE_FREESTYLE 
VFLAG_VERT_UV_SELECT 
VFLAG_VERT_UV_PINNED 
VFLAG_EDGE_UV_SELECT 
VFLAG_FACE_UV_ACTIVE 
VFLAG_FACE_UV_SELECT 

Definition at line 302 of file draw_cache_impl.hh.

◆ anonymous enum

anonymous enum
Enumerator
COLOR_NURB_ULINE_ID 
TOT_HANDLE_COL 

Definition at line 54 of file draw_cache_impl_curve.cc.

◆ anonymous enum

anonymous enum
Enumerator
CU_DATATYPE_WIRE 
CU_DATATYPE_OVERLAY 
CU_DATATYPE_NORMAL 
CU_DATATYPE_SURFACE 
CU_DATATYPE_TEXT_SELECT 

Definition at line 182 of file draw_cache_impl_curve.cc.

◆ anonymous enum

anonymous enum
Enumerator
LR_DATATYPE_VERT 
LR_DATATYPE_EDGE 
LR_DATATYPE_OVERLAY 

Definition at line 111 of file draw_cache_impl_lattice.cc.

◆ anonymous enum

anonymous enum
Enumerator
SHADER_BUFFER_LINES 
SHADER_BUFFER_LINES_LOOSE 
SHADER_BUFFER_EDGE_FAC 
SHADER_BUFFER_LNOR 
SHADER_BUFFER_TRIS 
SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS 
SHADER_BUFFER_NORMALS_ACCUMULATE 
SHADER_BUFFER_NORMALS_FINALIZE 
SHADER_BUFFER_CUSTOM_NORMALS_FINALIZE 
SHADER_PATCH_EVALUATION 
SHADER_PATCH_EVALUATION_FVAR 
SHADER_PATCH_EVALUATION_FACE_DOTS 
SHADER_PATCH_EVALUATION_FACE_DOTS_WITH_NORMALS 
SHADER_PATCH_EVALUATION_ORCO 
SHADER_COMP_CUSTOM_DATA_INTERP_1D 
SHADER_COMP_CUSTOM_DATA_INTERP_2D 
SHADER_COMP_CUSTOM_DATA_INTERP_3D 
SHADER_COMP_CUSTOM_DATA_INTERP_4D 
SHADER_BUFFER_SCULPT_DATA 
SHADER_BUFFER_UV_STRETCH_ANGLE 
SHADER_BUFFER_UV_STRETCH_AREA 
NUM_SHADERS 

Definition at line 67 of file draw_cache_impl_subdivision.cc.

◆ CurvesEvalShader

Enumerator
CURVES_EVAL_CATMULL_ROM 
CURVES_EVAL_BEZIER 

Definition at line 27 of file draw_curves_private.hh.

◆ DRWBatchFlag

Enumerator
MBC_SURFACE 
MBC_SURFACE_WEIGHTS 
MBC_EDIT_TRIANGLES 
MBC_EDIT_VERTICES 
MBC_EDIT_EDGES 
MBC_EDIT_VNOR 
MBC_EDIT_LNOR 
MBC_EDIT_FACEDOTS 
MBC_EDIT_MESH_ANALYSIS 
MBC_SKIN_ROOTS 
MBC_EDITUV_FACES_STRETCH_AREA 
MBC_EDITUV_FACES_STRETCH_ANGLE 
MBC_EDITUV_FACES 
MBC_EDITUV_EDGES 
MBC_EDITUV_VERTS 
MBC_EDITUV_FACEDOTS 
MBC_EDIT_SELECTION_VERTS 
MBC_EDIT_SELECTION_EDGES 
MBC_EDIT_SELECTION_FACES 
MBC_EDIT_SELECTION_FACEDOTS 
MBC_ALL_VERTS 
MBC_ALL_EDGES 
MBC_LOOSE_EDGES 
MBC_EDGE_DETECTION 
MBC_WIRE_EDGES 
MBC_WIRE_LOOPS 
MBC_WIRE_LOOPS_UVS 
MBC_SCULPT_OVERLAYS 
MBC_VIEWER_ATTRIBUTE_OVERLAY 
MBC_SURFACE_PER_MAT 

Definition at line 158 of file draw_cache_extract.hh.

◆ eMRExtractType

Enumerator
MR_EXTRACT_BMESH 
MR_EXTRACT_MESH 

Definition at line 44 of file extract_mesh.hh.

◆ ParticleSource

Enumerator
PARTICLE_SOURCE_PARENT 
PARTICLE_SOURCE_CHILDREN 

Definition at line 504 of file draw_cache_impl_particles.cc.

◆ SculptBatchFeature

Enumerator
SCULPT_BATCH_DEFAULT 
SCULPT_BATCH_WIREFRAME 
SCULPT_BATCH_MASK 
SCULPT_BATCH_FACE_SET 
SCULPT_BATCH_VERTEX_COLOR 
SCULPT_BATCH_UV 

Definition at line 24 of file draw_sculpt.hh.

Function Documentation

◆ accumululate_material_counts_bm()

static void blender::draw::accumululate_material_counts_bm ( const BMesh & bm,
threading::EnumerableThreadSpecific< Array< int > > & all_tri_counts )
static

◆ accumululate_material_counts_mesh()

◆ alloc_final_attribute_vbo()

◆ alloc_final_points_vbo()

◆ any_attr_requested()

static bool blender::draw::any_attr_requested ( const MeshBufferList & buffers)
static

◆ area_ratio_get()

BLI_INLINE float blender::draw::area_ratio_get ( float area,
float uvarea )

Definition at line 22 of file extract_mesh_vbo_edituv_stretch_area.cc.

◆ area_ratio_to_stretch()

BLI_INLINE float blender::draw::area_ratio_to_stretch ( float ratio,
float tot_ratio )

Definition at line 30 of file extract_mesh_vbo_edituv_stretch_area.cc.

◆ as_image() [1/2]

static Image ** blender::draw::as_image ( GPUTexture ** tex)
inlinestatic

Definition at line 1175 of file DRW_gpu_wrapper.hh.

References tex.

◆ as_image() [2/2]

static Image * blender::draw::as_image ( GPUTexture * tex)
inlinestatic

Definition at line 1170 of file DRW_gpu_wrapper.hh.

References tex.

◆ as_texture() [1/2]

static GPUTexture ** blender::draw::as_texture ( Image ** img)
inlinestatic

Definition at line 1185 of file DRW_gpu_wrapper.hh.

◆ as_texture() [2/2]

static GPUTexture * blender::draw::as_texture ( Image * img)
inlinestatic

Definition at line 1180 of file DRW_gpu_wrapper.hh.

◆ attribute_index_in_material()

static int blender::draw::attribute_index_in_material ( GPUMaterial * gpu_material,
const char * name )
static

◆ attribute_interpolate()

template<typename T >
static VArray< T > blender::draw::attribute_interpolate ( const VArray< T > & input,
const bke::CurvesGeometry & curves )
static

◆ axis_from_enum_v3()

static void blender::draw::axis_from_enum_v3 ( float v[3],
const char axis )
static

Definition at line 25 of file extract_mesh_vbo_mesh_analysis.cc.

References v, and zero_v3().

Referenced by statvis_calc_overhang().

◆ batch_cache_is_dirty()

static bool blender::draw::batch_cache_is_dirty ( const Curves & curves)
static

◆ batches_that_use_buffer()

◆ bezier_data_value()

static uint32_t blender::draw::bezier_data_value ( int8_t handle_type,
bool is_active )
static

◆ beztriple_vflag_get()

static uint8_t blender::draw::beztriple_vflag_get ( CurveRenderData * rdata,
uint8_t flag,
uint8_t col_id,
int v_idx,
int nu_id,
bool handle_point,
const bool handle_selected )
static

◆ BLI_STATIC_ASSERT()

◆ bm_edge_is_sharp()

static bool blender::draw::bm_edge_is_sharp ( const BMEdge *const & edge)
static

◆ bm_face_is_sharp()

static bool blender::draw::bm_face_is_sharp ( const BMFace *const & face)
static

◆ bm_face_no_get()

BLI_INLINE const float * blender::draw::bm_face_no_get ( const MeshRenderData & mr,
const BMFace * efa )

◆ bm_original_edge_get()

BLI_INLINE BMEdge * blender::draw::bm_original_edge_get ( const MeshRenderData & mr,
int idx )

◆ bm_original_face_get()

◆ bm_original_vert_get()

BLI_INLINE BMVert * blender::draw::bm_original_vert_get ( const MeshRenderData & mr,
int idx )

◆ bm_vert_co_get()

◆ bm_vert_no_get()

BLI_INLINE const float * blender::draw::bm_vert_no_get ( const MeshRenderData & mr,
const BMVert * eve )

◆ bmesh_normals_domain()

static bke::MeshNormalDomain blender::draw::bmesh_normals_domain ( BMesh * bm)
static

Returns which domain of normals is required because of sharp and smooth flags. Similar to #Mesh::normals_domain().

Definition at line 455 of file draw_cache_extract_mesh_render_data.cc.

References bm, BM_EDGE, BM_FACE, BM_mesh_elem_table_ensure(), bmesh_normals_domain(), CD_CUSTOMLOOPNORMAL, CustomData_has_layer(), BMesh::etable, BMesh::ftable, BMesh::ldata, BMesh::totedge, and BMesh::totface.

Referenced by bmesh_normals_domain(), and mesh_render_data_create().

◆ bpoint_vflag_get()

◆ build_poly_other_map_vbo()

◆ build_vertex_face_adjacency_maps()

◆ bvh_overlap_cb()

static bool blender::draw::bvh_overlap_cb ( void * userdata,
int index_a,
int index_b,
int  )
static

◆ calc_adjacency_bm()

static void blender::draw::calc_adjacency_bm ( const MeshRenderData & mr,
MutableSpan< int > vert_to_corner,
Map< OrderedEdge, int > & edge_hash,
GPUIndexBufBuilder & elb,
bool & is_manifold )
static

◆ calc_adjacency_mesh()

◆ calc_edit_handles_ibo()

◆ calc_face_tri_starts_bmesh()

◆ calc_face_tri_starts_mesh()

◆ calc_face_visibility_mesh()

◆ calc_final_indices()

◆ calc_mesh_edge_visibility()

◆ calc_vert_visibility_mapped_mesh()

◆ calc_vert_visibility_mesh()

◆ calc_visible_loose_edge_indices()

◆ clear_batch_cache()

static void blender::draw::clear_batch_cache ( Curves & curves)
static

◆ clear_edit_data()

◆ clear_eval_data()

◆ clear_final_data()

◆ compute_area_ratio()

◆ compute_coarse_face_flag_bm()

◆ compute_normalize_edge_vectors()

static void blender::draw::compute_normalize_edge_vectors ( float auv[2][2],
float av[2][3],
const float uv[2],
const float uv_prev[2],
const float co[3],
const float co_prev[3] )
static

◆ convert_normal() [1/3]

template<typename GPUType >
GPUType blender::draw::convert_normal ( const float3 & src)
inline

◆ convert_normal() [2/3]

template<>
GPUPackedNormal blender::draw::convert_normal ( const float3 & src)
inline

Definition at line 231 of file extract_mesh.hh.

References GPU_normal_convert_i10_v3().

◆ convert_normal() [3/3]

template<>
short4 blender::draw::convert_normal ( const float3 & src)
inline

Definition at line 236 of file extract_mesh.hh.

References normal_float_to_short_v3().

◆ convert_normals() [1/3]

template<>
void blender::draw::convert_normals ( const Span< float3 > src,
MutableSpan< GPUPackedNormal > normals )

Definition at line 27 of file extract_mesh_vbo_lnor.cc.

References convert_normals(), and convert_normals_impl().

◆ convert_normals() [2/3]

template<>
void blender::draw::convert_normals ( const Span< float3 > src,
MutableSpan< short4 > normals )

Definition at line 31 of file extract_mesh_vbo_lnor.cc.

References convert_normals(), and convert_normals_impl().

◆ convert_normals() [3/3]

template<typename GPUType >
void blender::draw::convert_normals ( Span< float3 > src,
MutableSpan< GPUType > dst )

◆ convert_normals_impl()

template<typename GPUType >
static void blender::draw::convert_normals_impl ( const Span< float3 > src,
MutableSpan< GPUType > dst )
static

◆ copy_transformed_positions()

static void blender::draw::copy_transformed_positions ( const Span< float3 > src_positions,
const IndexRange range,
const float4x4 & transform,
MutableSpan< float3 > dst_positions )
static

Definition at line 218 of file draw_cache_impl_grease_pencil.cc.

References range, and blender::math::transform_point().

◆ count_cache_segment_keys()

static void blender::draw::count_cache_segment_keys ( ParticleCacheKey ** pathcache,
const int num_path_cache_keys,
ParticleHairCache * hair_cache )
static

◆ create_buffer_and_interface()

◆ create_curve_offsets_vbos()

◆ create_edit_lines_ibo()

◆ create_edit_points_position_and_data()

◆ create_edit_points_position_vbo()

◆ create_edit_points_selection()

◆ create_lines_for_remaining_edges()

static void blender::draw::create_lines_for_remaining_edges ( MutableSpan< int > vert_to_corner,
Map< OrderedEdge, int > & edge_hash,
GPUIndexBufBuilder & elb,
bool & is_manifold )
static

◆ create_material_subranges()

◆ create_points_position_time_vbo()

◆ create_sculpt_cage_ibo()

◆ curve_batch_cache_clear()

static void blender::draw::curve_batch_cache_clear ( Curve * cu)
static

TODO

  • Ensure CurveCache, SEQUENCER_DAG_WORKAROUND.
  • Check number of verts/edges to see if cache is valid.
  • Check if 'overlay.edges' can use single attribute per edge, not 2 (for selection drawing).

Definition at line 420 of file draw_cache_impl_curve.cc.

References batch, blender::draw::CurveBatchCache::batch, Curve::batch_cache, blender::draw::CurveBatchCache::edit, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, blender::draw::CurveBatchCache::ibo, and blender::draw::CurveBatchCache::ordered.

Referenced by DRW_curve_batch_cache_free(), and DRW_curve_batch_cache_validate().

◆ curve_batch_cache_get()

◆ curve_batch_cache_init()

◆ curve_batch_cache_valid()

static bool blender::draw::curve_batch_cache_valid ( Curve * cu)
static

◆ curve_create_attribute()

◆ curve_create_curves_lines()

◆ curve_create_curves_pos()

◆ curve_create_edit_curves_nor()

◆ curve_create_edit_data_and_handles()

◆ curve_eval_render_wire_verts_edges_len_get()

static void blender::draw::curve_eval_render_wire_verts_edges_len_get ( const bke::CurvesGeometry & curves,
int * r_curve_len,
int * r_vert_len,
int * r_edge_len )
static

◆ curve_render_data_create()

◆ curve_render_data_free()

static void blender::draw::curve_render_data_free ( CurveRenderData * rdata)
static

Definition at line 248 of file draw_cache_impl_curve.cc.

References MEM_freeN().

Referenced by DRW_curve_batch_cache_create_requested().

◆ curve_render_data_normal_len_get()

static int blender::draw::curve_render_data_normal_len_get ( const CurveRenderData * rdata)
static

◆ curve_render_data_overlay_edges_len_get()

static int blender::draw::curve_render_data_overlay_edges_len_get ( const CurveRenderData * rdata)
static

◆ curve_render_data_overlay_verts_len_get()

static int blender::draw::curve_render_data_overlay_verts_len_get ( const CurveRenderData * rdata)
static

◆ curve_render_data_wire_curve_len_get()

static int blender::draw::curve_render_data_wire_curve_len_get ( const CurveRenderData * rdata)
static

◆ curve_render_data_wire_edges_len_get()

static int blender::draw::curve_render_data_wire_edges_len_get ( const CurveRenderData * rdata)
static

◆ curve_render_data_wire_verts_len_get()

◆ curve_render_normal_len_get()

static int blender::draw::curve_render_normal_len_get ( const ListBase * lb,
const CurveCache * ob_curve_cache )
static

◆ curve_render_overlay_verts_edges_len_get()

static void blender::draw::curve_render_overlay_verts_edges_len_get ( ListBase * lb,
int * r_vert_len,
int * r_edge_len )
static

Definition at line 72 of file draw_cache_impl_curve.cc.

References BLI_assert, and LISTBASE_FOREACH.

Referenced by curve_render_data_create().

◆ curves_cache_get()

◆ curves_ensure_procedural_data()

◆ curves_free()

void blender::draw::curves_free ( )

◆ curves_init()

◆ curves_pos_buffer_get()

◆ curves_sub_pass_setup()

gpu::Batch * blender::draw::curves_sub_pass_setup ( PassMain::Sub & ps,
const Scene * scene,
Object * ob,
GPUMaterial * gpu_material = nullptr )

◆ curves_sub_pass_setup_implementation()

template<typename PassT >
gpu::Batch * blender::draw::curves_sub_pass_setup_implementation ( PassT & sub_ps,
const Scene * scene,
Object * ob,
GPUMaterial * gpu_material )

◆ curves_update()

◆ discard_attributes()

◆ distort_remap()

BLI_INLINE float blender::draw::distort_remap ( float fac,
float min,
float ,
float minmax_irange )

Definition at line 362 of file extract_mesh_vbo_mesh_analysis.cc.

References CLAMP, and min.

Referenced by statvis_calc_distort().

◆ do_subdiv_traversal()

◆ draw_patch_map_build()

◆ draw_patch_map_free()

◆ draw_subdiv_accumulate_normals()

◆ draw_subdiv_build_cache()

static bool blender::draw::draw_subdiv_build_cache ( DRWSubdivCache & cache,
bke::subdiv::Subdiv * subdiv,
const Mesh * mesh_eval,
const SubsurfRuntimeData * runtime_data )
static

Definition at line 1167 of file draw_cache_impl_subdivision.cc.

References build_vertex_face_adjacency_maps(), blender::draw::DRWCacheBuildingContext::cache, blender::draw::DRWCacheBuildingContext::coarse_mesh, blender::draw::DRWSubdivCache::corner_patch_coords, blender::gpu::VertBuf::data(), data, do_subdiv_traversal(), draw_patch_map_build(), draw_subdiv_build_origindex_buffer(), draw_subdiv_cache_free(), blender::draw::DRWCacheBuildingContext::edge_draw_flag_map, blender::draw::DRWCacheBuildingContext::edge_origindex_map, blender::draw::DRWSubdivCache::face_ptex_offset, blender::draw::DRWSubdivCache::face_ptex_offset_buffer, blender::bke::subdiv::face_ptex_offset_get(), Mesh::faces_num, blender::draw::DRWSubdivCache::fdots_patch_coords, get_blender_patch_coords_format(), blender::draw::DRWSubdivCache::gpu_patch_map, gpu_vertbuf_create_from_format(), make_patch_coord(), blender::draw::DRWSubdivCache::may_have_loose_geom, MEM_SAFE_FREE, blender::draw::DRWSubdivCache::num_coarse_faces, blender::draw::DRWSubdivCache::num_subdiv_loops, blender::draw::DRWSubdivCache::num_subdiv_verts, blender::draw::DRWCacheBuildingContext::patch_coords, blender::draw::DRWSubdivCache::patch_coords, blender::bke::subdiv::ToMeshSettings::resolution, blender::draw::DRWSubdivCache::resolution, SubsurfRuntimeData::resolution, blender::draw::DRWCacheBuildingContext::settings, size(), blender::draw::DRWSubdivCache::subdiv_face_offset, blender::draw::DRWSubdivCache::subdiv_face_offset_buffer, blender::draw::DRWCacheBuildingContext::subdiv_loop_subdiv_vert_index, blender::bke::subdiv::ToMeshSettings::use_optimal_display, and blender::draw::DRWCacheBuildingContext::vert_origindex_map.

Referenced by draw_subdiv_create_requested_buffers().

◆ draw_subdiv_build_edge_fac_buffer()

◆ draw_subdiv_build_edituv_stretch_angle_buffer()

◆ draw_subdiv_build_edituv_stretch_area_buffer()

◆ draw_subdiv_build_fdots_buffers()

◆ draw_subdiv_build_lines_buffer()

◆ draw_subdiv_build_lines_loose_buffer()

void blender::draw::draw_subdiv_build_lines_loose_buffer ( const DRWSubdivCache & cache,
gpu::IndexBuf * lines_indices,
gpu::VertBuf * lines_flags,
uint edge_loose_offset,
uint num_loose_edges )

◆ draw_subdiv_build_lnor_buffer()

◆ draw_subdiv_build_origindex_buffer()

gpu::VertBuf * blender::draw::draw_subdiv_build_origindex_buffer ( int * vert_origindex,
uint num_loops )

◆ draw_subdiv_build_sculpt_data_buffer()

◆ draw_subdiv_build_tris_buffer()

◆ draw_subdiv_cache_ensure_mat_offsets()

static void blender::draw::draw_subdiv_cache_ensure_mat_offsets ( DRWSubdivCache & cache,
const Mesh * mesh_eval,
uint mat_len )
static

For material assignments we want indices for triangles that share a common material to be laid out contiguously in memory. To achieve this, we sort the indices based on which material the coarse face was assigned. The sort is performed by offsetting the loops indices so that they are directly assigned to the right sorted indices.

Here is a visual representation, considering four quads:
+---------+---------+---------+---------+
| 3 2 | 7 6 | 11 10 | 15 14 |
| | | | |
| 0 1 | 4 5 | 8 9 | 12 13 |
+---------+---------+---------+---------+
If the first and third quads have the same material, we should have:
+---------+---------+---------+---------+
| 3 2 | 11 10 | 7 6 | 15 14 |
| | | | |
| 0 1 | 8 9 | 4 5 | 12 13 |
+---------+---------+---------+---------+
So the offsets would be:
+---------+---------+---------+---------+
| 0 0 | 4 4 | -4 -4 | 0 0 |
| | | | |
| 0 0 | 4 4 | -4 -4 | 0 0 |
+---------+---------+---------+---------+

The offsets are computed not based on the loops indices, but on the number of subdivided polygons for each coarse face. We then only store a single offset for each coarse face, since all sub-faces are contiguous, they all share the same offset.

Definition at line 2037 of file draw_cache_impl_subdivision.cc.

References Geometry::attributes, draw_subdiv_build_origindex_buffer(), draw_subdiv_cache_free_material_data(), blender::bke::Face, blender::draw::DRWSubdivCache::face_mat_offset, Mesh::faces_num, blender::draw::DRWSubdivCache::mat_end, blender::draw::DRWSubdivCache::mat_start, MEM_callocN, MEM_dupallocN, MEM_freeN(), MEM_mallocN, blender::draw::DRWSubdivCache::num_subdiv_loops, and blender::draw::DRWSubdivCache::subdiv_face_offset.

Referenced by draw_subdiv_create_requested_buffers().

◆ draw_subdiv_cache_extra_coarse_face_data_bm()

static void blender::draw::draw_subdiv_cache_extra_coarse_face_data_bm ( BMesh * bm,
BMFace * efa_act,
MutableSpan< uint32_t > flags_data )
static

◆ draw_subdiv_cache_extra_coarse_face_data_mapped()

◆ draw_subdiv_cache_extra_coarse_face_data_mesh()

◆ draw_subdiv_cache_free()

void blender::draw::draw_subdiv_cache_free ( DRWSubdivCache & cache)

◆ draw_subdiv_cache_free_material_data()

◆ draw_subdiv_cache_need_face_data()

◆ draw_subdiv_cache_update_extra_coarse_face_data()

◆ draw_subdiv_create_requested_buffers()

static bool blender::draw::draw_subdiv_create_requested_buffers ( Object & ob,
Mesh & mesh,
MeshBatchCache & batch_cache,
MeshBufferCache & mbc,
const bool is_editmode,
const bool is_paint_mode,
const bool edit_mode_active,
const float4x4 & object_to_world,
const bool do_final,
const bool do_uvedit,
const bool do_cage,
const ToolSettings * ts,
const bool use_hide,
OpenSubdiv_EvaluatorCache * evaluator_cache )
static

Definition at line 2104 of file draw_cache_impl_subdivision.cc.

References BKE_object_get_editmesh_eval_final(), BKE_subsurf_modifier_subdiv_descriptor_ensure(), BLI_assert, blender::draw::DRWSubdivCache::bm, bm, blender::draw::MeshBufferCache::buff, CD_CUSTOMLOOPNORMAL, Mesh::corner_data, CustomData_has_layer(), draw_subdiv_build_cache(), draw_subdiv_cache_ensure_mat_offsets(), draw_subdiv_cache_update_extra_coarse_face_data(), draw_subdiv_invalidate_evaluator_for_orco(), DRW_ibo_requested(), blender::bke::subdiv::eval_begin_from_mesh(), Mesh::faces_num, SubsurfRuntimeData::has_gpu_subdiv, blender::draw::DRWSubdivCache::hide_unmapped_edges, blender::draw::MeshBufferList::ibo, blender::draw::DRWSubdivCache::is_edit_mode, blender::bke::subdiv::Settings::level, blender::draw::MeshBatchCache::mat_len, blender::draw::DRWSubdivCache::mesh, mesh, mesh_batch_cache_ensure_subdiv_cache(), mesh_buffer_cache_create_requested_subdiv(), mesh_render_data_create(), blender::draw::DRWSubdivCache::num_subdiv_edges, blender::draw::DRWSubdivCache::num_subdiv_loops, blender::draw::DRWSubdivCache::num_subdiv_quads, blender::draw::DRWSubdivCache::num_subdiv_triangles, blender::draw::DRWSubdivCache::num_subdiv_verts, blender::draw::DRWSubdivCache::optimal_display, SubsurfRuntimeData::settings, SubsurfRuntimeData::stats_faces_num, SubsurfRuntimeData::stats_totedge, SubsurfRuntimeData::stats_totloop, SubsurfRuntimeData::stats_totvert, blender::draw::DRWSubdivCache::subdiv, blender::bke::subdiv::SUBDIV_EVALUATOR_TYPE_GPU, SubsurfRuntimeData::subdiv_gpu, blender::draw::MeshBufferList::tris, tris_count_from_number_of_loops(), blender::draw::DRWSubdivCache::use_custom_loop_normals, blender::draw::DRWSubdivCache::use_hide, SubsurfRuntimeData::use_loop_normals, and SubsurfRuntimeData::use_optimal_display.

Referenced by DRW_create_subdivision().

◆ draw_subdiv_edge_cb()

◆ draw_subdiv_extract_pos_nor()

◆ draw_subdiv_extract_uvs()

◆ draw_subdiv_finalize_custom_normals()

◆ draw_subdiv_finalize_normals()

◆ draw_subdiv_foreach_callbacks()

◆ draw_subdiv_free_edit_mode_cache()

◆ draw_subdiv_get_pos_nor_format()

const GPUVertFormat & blender::draw::draw_subdiv_get_pos_nor_format ( )

Return the format used for the positions and normals VBO.

Definition at line 478 of file draw_cache_impl_subdivision.cc.

References GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_vertformat_alias_add(), and GPU_vertformat_attr_add().

Referenced by extract_edituv_stretch_angle_subdiv(), and extract_positions_subdiv().

◆ draw_subdiv_init_origindex_buffer()

◆ draw_subdiv_init_ubo_storage()

static void blender::draw::draw_subdiv_init_ubo_storage ( const DRWSubdivCache & cache,
DRWSubdivUboStorage * ubo,
const int src_offset,
const int dst_offset,
const uint total_dispatch_size,
const bool has_sculpt_mask,
const uint edge_loose_offset )
static

Definition at line 1329 of file draw_cache_impl_subdivision.cc.

References blender::draw::DRWSubdivUboStorage::coarse_face_active_mask, blender::draw::DRWSubdivUboStorage::coarse_face_count, blender::draw::DRWSubdivUboStorage::coarse_face_hidden_mask, blender::draw::DRWSubdivUboStorage::coarse_face_loopstart_mask, blender::draw::DRWSubdivUboStorage::coarse_face_select_mask, blender::draw::DRWSubdivUboStorage::coarse_face_smooth_mask, blender::draw::DRWSubdivUboStorage::dst_offset, blender::draw::DRWSubdivUboStorage::edge_loose_offset, blender::draw::DRWSubdivCache::gpu_patch_map, blender::draw::DRWSubdivUboStorage::has_sculpt_mask, blender::draw::DRWSubdivCache::is_edit_mode, blender::draw::DRWSubdivUboStorage::is_edit_mode, blender::draw::DRWPatchMap::max_depth, blender::draw::DRWSubdivUboStorage::max_depth, blender::draw::DRWPatchMap::max_patch_face, blender::draw::DRWSubdivUboStorage::max_patch_face, blender::draw::DRWPatchMap::min_patch_face, blender::draw::DRWSubdivUboStorage::min_patch_face, blender::draw::DRWSubdivCache::num_coarse_faces, blender::draw::DRWSubdivCache::num_subdiv_loops, blender::draw::DRWSubdivUboStorage::num_subdiv_loops, blender::draw::DRWPatchMap::patches_are_triangular, blender::draw::DRWSubdivUboStorage::patches_are_triangular, blender::draw::DRWSubdivUboStorage::src_offset, SUBDIV_COARSE_FACE_FLAG_ACTIVE_MASK, SUBDIV_COARSE_FACE_FLAG_HIDDEN_MASK, SUBDIV_COARSE_FACE_FLAG_SELECT_MASK, SUBDIV_COARSE_FACE_FLAG_SMOOTH_MASK, SUBDIV_COARSE_FACE_LOOP_START_MASK, blender::draw::DRWSubdivUboStorage::total_dispatch_size, blender::draw::DRWSubdivCache::use_hide, and blender::draw::DRWSubdivUboStorage::use_hide.

Referenced by draw_subdiv_ubo_update_and_bind().

◆ draw_subdiv_interp_custom_data()

◆ draw_subdiv_invalidate_evaluator_for_orco()

◆ draw_subdiv_loop_cb()

◆ draw_subdiv_topology_info_cb()

static bool blender::draw::draw_subdiv_topology_info_cb ( const bke::subdiv::ForeachContext * foreach_context,
const int num_verts,
const int num_edges,
const int num_loops,
const int num_faces,
const int * subdiv_face_offset )
static

Definition at line 901 of file draw_cache_impl_subdivision.cc.

References blender::draw::DRWCacheBuildingContext::cache, CD_ORIGINDEX, blender::draw::DRWCacheBuildingContext::coarse_mesh, blender::draw::DRWSubdivCache::corner_patch_coords, CustomData_get_layer(), blender::gpu::VertBuf::data(), data, Mesh::edge_data, blender::draw::DRWCacheBuildingContext::edge_draw_flag_map, blender::draw::DRWCacheBuildingContext::edge_origindex_map, blender::draw::DRWSubdivCache::edges_draw_flag, blender::draw::DRWSubdivCache::edges_orig_index, get_blender_patch_coords_format(), get_origindex_format(), GPU_USAGE_DYNAMIC, GPU_vertbuf_calloc(), GPU_vertbuf_data_alloc(), GPU_vertbuf_init_with_format_ex(), blender::draw::DRWSubdivCache::may_have_loose_geom, MEM_callocN, MEM_dupallocN, MEM_mallocN, blender::draw::DRWSubdivCache::num_subdiv_edges, blender::draw::DRWSubdivCache::num_subdiv_loops, blender::draw::DRWSubdivCache::num_subdiv_quads, blender::draw::DRWSubdivCache::num_subdiv_verts, blender::draw::DRWCacheBuildingContext::orig_index_edge, blender::draw::DRWCacheBuildingContext::orig_index_vert, blender::draw::DRWCacheBuildingContext::patch_coords, blender::draw::DRWSubdivCache::patch_coords, blender::draw::DRWSubdivCache::subdiv_face_offset, blender::draw::DRWCacheBuildingContext::subdiv_loop_edge_draw_flag, blender::draw::DRWCacheBuildingContext::subdiv_loop_edge_index, blender::draw::DRWCacheBuildingContext::subdiv_loop_face_index, blender::draw::DRWSubdivCache::subdiv_loop_face_index, blender::draw::DRWCacheBuildingContext::subdiv_loop_subdiv_edge_index, blender::draw::DRWSubdivCache::subdiv_loop_subdiv_edge_index, blender::draw::DRWCacheBuildingContext::subdiv_loop_subdiv_vert_index, blender::draw::DRWSubdivCache::subdiv_loop_subdiv_vert_index, blender::draw::DRWCacheBuildingContext::subdiv_loop_vert_index, blender::bke::subdiv::ForeachContext::user_data, Mesh::vert_data, blender::draw::DRWCacheBuildingContext::vert_origindex_map, and blender::draw::DRWSubdivCache::verts_orig_index.

Referenced by draw_subdiv_foreach_callbacks().

◆ draw_subdiv_ubo_update_and_bind()

static void blender::draw::draw_subdiv_ubo_update_and_bind ( const DRWSubdivCache & cache,
GPUShader * shader,
const int src_offset,
const int dst_offset,
const uint total_dispatch_size,
const bool has_sculpt_mask = false,
const uint edge_loose_offset = 0 )
static

◆ draw_subdiv_vertex_corner_cb()

static void blender::draw::draw_subdiv_vertex_corner_cb ( const bke::subdiv::ForeachContext * foreach_context,
void * ,
const int ,
const float ,
const float ,
const int coarse_vertex_index,
const int ,
const int ,
const int subdiv_vertex_index )
static

◆ draw_subdiv_vertex_edge_cb()

static void blender::draw::draw_subdiv_vertex_edge_cb ( const bke::subdiv::ForeachContext * ,
void * ,
const int ,
const float ,
const float ,
const int ,
const int ,
const int ,
const int  )
static

Definition at line 1019 of file draw_cache_impl_subdivision.cc.

Referenced by draw_subdiv_foreach_callbacks().

◆ drw_add_attributes_vbo()

static void blender::draw::drw_add_attributes_vbo ( gpu::Batch * batch,
MeshBufferList * mbuflist,
DRW_Attributes * attr_used )
static

◆ drw_attributes_add_request()

◆ drw_attributes_clear()

◆ drw_attributes_has_request()

◆ drw_attributes_merge()

◆ drw_attributes_merge_requests()

static void blender::draw::drw_attributes_merge_requests ( const DRW_Attributes * src_requests,
DRW_Attributes * dst_requests )
static

◆ drw_attributes_overlap()

◆ DRW_batch_cache_free_old()

void blender::draw::DRW_batch_cache_free_old ( Object * ob,
int ctime )

◆ DRW_cache_free_old_subdiv()

◆ DRW_cache_gpencil_sbuffer_clear()

void blender::draw::DRW_cache_gpencil_sbuffer_clear ( Object * ob)

◆ DRW_cache_grease_pencil_color_buffer_get()

◆ DRW_cache_grease_pencil_edit_lines_get()

◆ DRW_cache_grease_pencil_edit_points_get()

◆ DRW_cache_grease_pencil_face_wireframe_get()

◆ DRW_cache_grease_pencil_get()

◆ DRW_cache_grease_pencil_position_buffer_get()

◆ DRW_cache_grease_pencil_weight_lines_get()

◆ DRW_cache_grease_pencil_weight_points_get()

◆ DRW_cache_volume_face_wireframe_get()

blender::gpu::Batch * blender::draw::DRW_cache_volume_face_wireframe_get ( Object * ob)

◆ DRW_cache_volume_selection_surface_get()

blender::gpu::Batch * blender::draw::DRW_cache_volume_selection_surface_get ( Object * ob)

◆ DRW_create_subdivision()

void blender::draw::DRW_create_subdivision ( Object & ob,
Mesh & mesh,
MeshBatchCache & batch_cache,
MeshBufferCache & mbc,
const bool is_editmode,
const bool is_paint_mode,
const bool edit_mode_active,
const float4x4 & object_to_world,
const bool do_final,
const bool do_uvedit,
const bool do_cage,
const ToolSettings * ts,
const bool use_hide )

◆ DRW_curve_batch_cache_create_requested()

◆ DRW_curve_batch_cache_dirty_tag()

◆ DRW_curve_batch_cache_free()

void blender::draw::DRW_curve_batch_cache_free ( Curve * cu)

◆ DRW_curve_batch_cache_get_edit_edges()

gpu::Batch * blender::draw::DRW_curve_batch_cache_get_edit_edges ( Curve * cu)

◆ DRW_curve_batch_cache_get_edit_verts()

gpu::Batch * blender::draw::DRW_curve_batch_cache_get_edit_verts ( Curve * cu)

◆ DRW_curve_batch_cache_get_normal_edge()

gpu::Batch * blender::draw::DRW_curve_batch_cache_get_normal_edge ( Curve * cu)

◆ DRW_curve_batch_cache_get_wire_edge()

gpu::Batch * blender::draw::DRW_curve_batch_cache_get_wire_edge ( Curve * cu)

◆ DRW_curve_batch_cache_get_wire_edge_viewer_attribute()

gpu::Batch * blender::draw::DRW_curve_batch_cache_get_wire_edge_viewer_attribute ( Curve * cu)

◆ DRW_curve_batch_cache_validate()

void blender::draw::DRW_curve_batch_cache_validate ( Curve * cu)

◆ DRW_curve_material_count_get()

int blender::draw::DRW_curve_material_count_get ( const Curve * cu)

Definition at line 822 of file draw_cache_impl_curve.cc.

References max_ii(), and Curve::totcol.

◆ DRW_curves_batch_cache_create_requested()

void blender::draw::DRW_curves_batch_cache_create_requested ( Object * ob)

◆ DRW_curves_batch_cache_dirty_tag()

void blender::draw::DRW_curves_batch_cache_dirty_tag ( Curves * curves,
int mode )

◆ DRW_curves_batch_cache_free()

void blender::draw::DRW_curves_batch_cache_free ( Curves * curves)

◆ DRW_curves_batch_cache_free_old()

◆ DRW_curves_batch_cache_get_edit_curves_handles()

◆ DRW_curves_batch_cache_get_edit_curves_lines()

◆ DRW_curves_batch_cache_get_edit_points()

◆ DRW_curves_batch_cache_get_sculpt_curves_cage()

◆ DRW_curves_batch_cache_validate()

void blender::draw::DRW_curves_batch_cache_validate ( Curves * curves)

◆ drw_curves_cache_get()

static CurvesEvalCache * blender::draw::drw_curves_cache_get ( Curves & curves,
GPUMaterial * gpu_material,
int subdiv,
int thickness_res )
static

◆ drw_curves_cache_shgrp_attach_resources()

◆ drw_curves_cache_update_compute() [1/2]

◆ drw_curves_cache_update_compute() [2/2]

◆ drw_curves_ensure_dummy_vbo()

◆ DRW_curves_free()

void blender::draw::DRW_curves_free ( )

Definition at line 367 of file draw_curves.cc.

References DRW_hair_free(), g_dummy_vbo, and GPU_VERTBUF_DISCARD_SAFE.

◆ drw_curves_get_attribute_sampler_name()

◆ DRW_curves_init()

void blender::draw::DRW_curves_init ( DRWData * drw_data)

◆ DRW_curves_material_count_get()

int blender::draw::DRW_curves_material_count_get ( const Curves * curves)

Definition at line 945 of file draw_cache_impl_curves.cc.

References DRW_curves_material_count_get(), and max_ii().

Referenced by DRW_curves_material_count_get().

◆ DRW_curves_pos_buffer_get()

◆ DRW_curves_texture_for_evaluated_attribute()

◆ DRW_curves_ubos_pool_free()

void blender::draw::DRW_curves_ubos_pool_free ( CurvesUniformBufPool * pool)

Definition at line 112 of file draw_curves.cc.

◆ DRW_curves_update()

◆ drw_custom_data_match_attribute()

◆ DRW_gpencil_batch_cache_dirty_tag()

void blender::draw::DRW_gpencil_batch_cache_dirty_tag ( bGPdata * gpd)

Definition at line 100 of file draw_cache_impl_gpencil_legacy.cc.

References bGPdata::flag, and GP_DATA_CACHE_IS_DIRTY.

◆ DRW_gpencil_batch_cache_free()

void blender::draw::DRW_gpencil_batch_cache_free ( bGPdata * gpd)

◆ DRW_grease_pencil_batch_cache_dirty_tag()

◆ DRW_grease_pencil_batch_cache_free()

void blender::draw::DRW_grease_pencil_batch_cache_free ( GreasePencil * grase_pencil)

◆ DRW_grease_pencil_batch_cache_validate()

◆ DRW_lattice_batch_cache_dirty_tag()

◆ DRW_lattice_batch_cache_free()

void blender::draw::DRW_lattice_batch_cache_free ( Lattice * lt)

◆ DRW_lattice_batch_cache_get_all_edges()

◆ DRW_lattice_batch_cache_get_all_verts()

◆ DRW_lattice_batch_cache_get_edit_verts()

gpu::Batch * blender::draw::DRW_lattice_batch_cache_get_edit_verts ( Lattice * lt)

◆ DRW_lattice_batch_cache_validate()

void blender::draw::DRW_lattice_batch_cache_validate ( Lattice * lt)

◆ drw_mesh_batch_cache_check_available()

◆ DRW_mesh_batch_cache_create_requested()

void blender::draw::DRW_mesh_batch_cache_create_requested ( TaskGraph & task_graph,
Object & ob,
Mesh & mesh,
const Scene & scene,
bool is_paint_mode,
bool use_hide )

Can be called for any surface type. Mesh *mesh is the final mesh.

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.

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 1330 of file draw_cache_impl_mesh.cc.

References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify(), blender::draw::MeshBatchList::all_edges, blender::draw::MeshBatchList::all_verts, blender::draw::MeshBatchCache::attr_needed, blender::draw::MeshBatchCache::attr_used, blender::draw::MeshBatchCache::attr_used_over_time, blender::draw::MeshBufferList::attr_viewer, blender::draw::MeshBatchCache::batch, blender::draw::MeshBatchCache::batch_ready, blender::draw::MeshBatchCache::batch_requested, batches_that_use_buffer(), BKE_object_get_editmesh_eval_cage(), BKE_object_get_editmesh_eval_final(), BKE_subsurf_modifier_has_gpu_subdiv(), BLI_assert, BLI_task_graph_work_and_wait(), blender::draw::MeshBufferCache::buff, BUFFER_INDEX, blender::draw::MeshBatchCache::cage, blender::draw::MeshBatchCache::cd_needed, CD_ORCO, blender::draw::MeshBatchCache::cd_used, blender::draw::MeshBatchCache::cd_used_over_time, CustomData_get_layer(), drw_add_attributes_vbo(), drw_attributes_clear(), drw_attributes_merge(), drw_attributes_overlap(), DRW_batch_requested(), DRW_create_subdivision(), DRW_ibo_request(), drw_mesh_batch_cache_check_available(), drw_mesh_weight_state_clear(), drw_mesh_weight_state_copy(), drw_mesh_weight_state_extract(), DRW_object_is_in_edit_mode(), DRW_vbo_request(), blender::draw::MeshBatchList::edge_detection, blender::draw::MeshBufferList::edge_fac, blender::draw::MeshBufferList::edge_idx, blender::draw::MeshBufferList::edit_data, blender::draw::MeshBatchList::edit_edges, blender::draw::MeshBatchList::edit_fdots, blender::draw::MeshBatchList::edit_lnor, blender::draw::MeshBatchList::edit_mesh_analysis, blender::draw::MeshBatchList::edit_selection_edges, blender::draw::MeshBatchList::edit_selection_faces, blender::draw::MeshBatchList::edit_selection_fdots, blender::draw::MeshBatchList::edit_selection_verts, blender::draw::MeshBatchList::edit_skin_roots, blender::draw::MeshBatchList::edit_triangles, blender::draw::MeshBatchList::edit_vertices, blender::draw::MeshBatchList::edit_vnor, blender::draw::MeshBufferList::edituv_data, blender::draw::MeshBatchList::edituv_edges, blender::draw::MeshBatchList::edituv_faces, blender::draw::MeshBatchList::edituv_faces_stretch_angle, blender::draw::MeshBatchList::edituv_faces_stretch_area, blender::draw::MeshBatchList::edituv_fdots, blender::draw::MeshBufferList::edituv_fdots, blender::draw::MeshBufferList::edituv_lines, blender::draw::MeshBufferList::edituv_points, blender::draw::MeshBufferList::edituv_stretch_angle, blender::draw::MeshBufferList::edituv_stretch_area, blender::draw::MeshBufferList::edituv_tris, blender::draw::MeshBatchList::edituv_verts, blender::draw::MeshBufferList::face_idx, blender::draw::MeshBufferList::fdot_idx, blender::draw::MeshBufferList::fdots, blender::draw::MeshBufferList::fdots_edituv_data, blender::draw::MeshBufferList::fdots_nor, blender::draw::MeshBufferList::fdots_pos, blender::draw::MeshBufferList::fdots_uv, blender::draw::MeshBatchCache::final, FOREACH_MESH_BUFFER_CACHE, GPU_BATCH_CLEAR_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_MAX_ATTR, GPU_PRIM_LINES, GPU_PRIM_LINES_ADJ, GPU_PRIM_POINTS, GPU_PRIM_TRIS, GPU_VERTBUF_DISCARD_SAFE, blender::draw::MeshBufferList::ibo, blender::draw::MeshBatchCache::is_uvsyncsel, blender::draw::MeshBufferList::lines, blender::draw::MeshBufferList::lines_adjacency, blender::draw::MeshBufferList::lines_loose, blender::draw::MeshBufferList::lines_paint_mask, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::draw::MeshBatchList::loose_edges, blender::draw::MeshBatchCache::mat_len, MBC_ALL_EDGES, MBC_ALL_VERTS, MBC_EDGE_DETECTION, MBC_EDIT_EDGES, MBC_EDIT_FACEDOTS, MBC_EDIT_LNOR, 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_EDIT_VNOR, MBC_EDITUV, MBC_EDITUV_EDGES, MBC_EDITUV_FACEDOTS, MBC_EDITUV_FACES, MBC_EDITUV_FACES_STRETCH_ANGLE, MBC_EDITUV_FACES_STRETCH_AREA, MBC_EDITUV_VERTS, MBC_LOOSE_EDGES, MBC_SCULPT_OVERLAYS, MBC_SKIN_ROOTS, MBC_SURFACE, MBC_SURFACE_PER_MAT, MBC_SURFACE_WEIGHTS, MBC_VIEWER_ATTRIBUTE_OVERLAY, MBC_WIRE_EDGES, MBC_WIRE_LOOPS, MBC_WIRE_LOOPS_UVS, ME_WRAPPER_TYPE_BMESH, mesh, blender::draw::MeshBufferList::mesh_analysis, mesh_batch_cache_check_vertex_group(), mesh_batch_cache_free_subdiv_cache(), mesh_batch_cache_get(), mesh_buffer_cache_create_requested(), mesh_cd_layers_type_clear(), mesh_cd_layers_type_merge(), mesh_cd_layers_type_overlap(), Object::mode, blender::draw::MeshBufferList::nor, OB_MESH, OB_MODE_EDIT, blender::draw::DRW_MeshCDMask::orco, blender::draw::MeshBufferList::orco, blender::bke::object::pbvh_get(), blender::draw::MeshBufferList::points, blender::draw::MeshBufferList::pos, Mesh::runtime, Object::sculpt, blender::draw::MeshBufferList::sculpt_data, blender::draw::DRW_MeshCDMask::sculpt_overlays, blender::draw::MeshBatchList::sculpt_overlays, blender::draw::MeshBufferList::skin_roots, blender::draw::MeshBatchList::surface, blender::draw::MeshBatchCache::surface_per_mat, blender::draw::MeshBatchList::surface_viewer_attribute, blender::draw::MeshBatchList::surface_weights, blender::draw::DRW_MeshCDMask::tan, blender::draw::MeshBufferList::tan, blender::draw::DRW_MeshCDMask::tan_orco, blender::draw::MeshBufferList::tris, blender::draw::MeshBatchCache::tris_per_mat, TRIS_PER_MAT_INDEX, Object::type, blender::bke::pbvh::update_normals_from_eval(), blender::draw::DRW_MeshCDMask::uv, blender::draw::MeshBufferList::uv, blender::draw::MeshBatchCache::uv_cage, ToolSettings::uv_flag, UV_SYNC_SELECTION, blender::draw::MeshBufferList::vbo, Mesh::vert_data, blender::draw::MeshBufferList::vert_idx, blender::draw::MeshBufferList::vnor, blender::draw::MeshBatchCache::weight_state, blender::draw::MeshBufferList::weights, blender::draw::MeshBatchList::wire_edges, blender::draw::MeshBatchList::wire_loops, and blender::draw::MeshBatchList::wire_loops_uvs.

◆ DRW_mesh_batch_cache_dirty_tag()

◆ DRW_mesh_batch_cache_free()

void blender::draw::DRW_mesh_batch_cache_free ( void * batch_cache)

Definition at line 833 of file draw_cache_impl_mesh.cc.

References mesh_batch_cache_clear().

◆ DRW_mesh_batch_cache_free_old()

void blender::draw::DRW_mesh_batch_cache_free_old ( Mesh * mesh,
int ctime )

◆ DRW_mesh_batch_cache_get_all_edges()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_all_edges ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_all_verts()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_all_verts ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_edge_detection()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_edge_detection ( Mesh & mesh,
bool * r_is_manifold )

◆ DRW_mesh_batch_cache_get_edges_with_select_id()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_edges_with_select_id ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_edit_edges()

◆ DRW_mesh_batch_cache_get_edit_facedots()

◆ DRW_mesh_batch_cache_get_edit_loop_normals()

◆ DRW_mesh_batch_cache_get_edit_mesh_analysis()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_edit_mesh_analysis ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_edit_skin_roots()

◆ DRW_mesh_batch_cache_get_edit_triangles()

◆ DRW_mesh_batch_cache_get_edit_vert_normals()

◆ DRW_mesh_batch_cache_get_edit_vertices()

◆ 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()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_edituv_faces_stretch_area ( Object & object,
Mesh & mesh,
float ** tot_area,
float ** tot_uv_area )

Creates the #blender::gpu::Batch for drawing the UV Stretching Area Overlay. Optional retrieves the total area or total uv area of the mesh.

The cache->tot_area and cache->tot_uv_areaupdate are calculation are only valid after callingDRW_mesh_batch_cache_create_requested`.

Definition at line 1183 of file draw_cache_impl_mesh.cc.

References blender::draw::MeshBatchCache::batch, DRW_batch_request(), blender::draw::MeshBatchList::edituv_faces_stretch_area, edituv_request_active_uv(), MBC_EDITUV_FACES_STRETCH_AREA, mesh_batch_cache_add_request(), mesh_batch_cache_get(), blender::draw::MeshBatchCache::tot_area, and blender::draw::MeshBatchCache::tot_uv_area.

Referenced by blender::draw::overlay::MeshUVs::edit_object_sync().

◆ DRW_mesh_batch_cache_get_edituv_verts()

◆ DRW_mesh_batch_cache_get_facedots_with_select_id()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_facedots_with_select_id ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_loose_edges()

◆ DRW_mesh_batch_cache_get_sculpt_overlays()

◆ DRW_mesh_batch_cache_get_surface()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_surface ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_surface_edges()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_surface_edges ( Object & object,
Mesh & mesh )

◆ 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()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_surface_texpaint_single ( Object & object,
Mesh & mesh )

◆ DRW_mesh_batch_cache_get_surface_vertpaint()

◆ DRW_mesh_batch_cache_get_surface_viewer_attribute()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_surface_viewer_attribute ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_surface_weights()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_surface_weights ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_triangles_with_select_id()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_triangles_with_select_id ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_uv_edges()

◆ DRW_mesh_batch_cache_get_verts_with_select_id()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_verts_with_select_id ( Mesh & mesh)

◆ DRW_mesh_batch_cache_get_wireframes_face()

gpu::Batch * blender::draw::DRW_mesh_batch_cache_get_wireframes_face ( Mesh & mesh)

◆ DRW_mesh_batch_cache_pos_vertbuf_get()

◆ DRW_mesh_batch_cache_validate()

void blender::draw::DRW_mesh_batch_cache_validate ( Object & object,
Mesh & mesh )

◆ drw_mesh_flags_equal()

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

Definition at line 455 of file draw_cache_impl_mesh.cc.

Referenced by drw_mesh_weight_state_compare().

◆ DRW_mesh_get_attributes()

void blender::draw::DRW_mesh_get_attributes ( const Object & object,
const Mesh & mesh,
const GPUMaterial *const * gpumat_array,
int gpumat_array_len,
DRW_Attributes * r_attrs,
DRW_MeshCDMask * r_cd_needed )

◆ DRW_mesh_material_count_get()

int blender::draw::DRW_mesh_material_count_get ( const Object & object,
const Mesh & mesh )

Definition at line 1032 of file draw_cache_impl_mesh.cc.

References mesh_render_mat_len_get().

◆ drw_mesh_weight_state_clear()

◆ drw_mesh_weight_state_compare()

static bool blender::draw::drw_mesh_weight_state_compare ( const DRW_MeshWeightState * a,
const DRW_MeshWeightState * b )
static

Compare two selection structures.

Definition at line 462 of file draw_cache_impl_mesh.cc.

References b, and drw_mesh_flags_equal().

Referenced by mesh_batch_cache_check_vertex_group().

◆ drw_mesh_weight_state_copy()

static void blender::draw::drw_mesh_weight_state_copy ( DRW_MeshWeightState * wstate_dst,
const DRW_MeshWeightState * wstate_src )
static

◆ drw_mesh_weight_state_extract()

◆ DRW_particle_batch_cache_dirty_tag()

void blender::draw::DRW_particle_batch_cache_dirty_tag ( ParticleSystem * psys,
int mode )

◆ DRW_particle_batch_cache_free()

void blender::draw::DRW_particle_batch_cache_free ( ParticleSystem * psys)

◆ drw_particle_get_hair_source()

◆ drw_particle_update_ptcache()

◆ drw_particle_update_ptcache_edit()

◆ DRW_particles_batch_cache_get_dots()

◆ DRW_particles_batch_cache_get_edit_inner_points()

◆ DRW_particles_batch_cache_get_edit_strands()

◆ DRW_particles_batch_cache_get_edit_tip_points()

◆ DRW_particles_batch_cache_get_hair()

◆ DRW_pointcloud_batch_cache_create_requested()

◆ DRW_pointcloud_batch_cache_dirty_tag()

void blender::draw::DRW_pointcloud_batch_cache_dirty_tag ( PointCloud * pointcloud,
int mode )

◆ DRW_pointcloud_batch_cache_free()

void blender::draw::DRW_pointcloud_batch_cache_free ( PointCloud * pointcloud)

◆ DRW_pointcloud_batch_cache_free_old()

◆ DRW_pointcloud_batch_cache_get_dots()

◆ DRW_pointcloud_batch_cache_validate()

void blender::draw::DRW_pointcloud_batch_cache_validate ( PointCloud * pointcloud)

◆ DRW_pointcloud_evaluated_attribute()

◆ DRW_pointcloud_free()

void blender::draw::DRW_pointcloud_free ( )

Definition at line 100 of file draw_pointcloud.cc.

References g_dummy_vbo, and GPU_VERTBUF_DISCARD_SAFE.

◆ DRW_pointcloud_init()

◆ DRW_pointcloud_material_count_get()

int blender::draw::DRW_pointcloud_material_count_get ( const PointCloud * pointcloud)

◆ DRW_pointcloud_position_and_radius_buffer_get()

◆ DRW_shgroup_curves_create_sub()

DRWShadingGroup * blender::draw::DRW_shgroup_curves_create_sub ( Object * object,
DRWShadingGroup * shgrp,
GPUMaterial * gpu_material )

Definition at line 221 of file draw_curves.cc.

References blender::draw::CurvesEvalFinalCache::attr_used, attribute_index_in_material(), blender::draw::DRW_AttributeRequest::attribute_name, blender::draw::CurvesEvalFinalCache::attributes_buf, CD_PROP_FLOAT2, blender::draw::DRW_AttributeRequest::cd_type, blender::bke::Curve, CurvesGeometry::curve_data, DRWData::curves_ubos, CustomData_get_render_layer(), CustomData_has_layer(), blender::draw::DRW_AttributeRequest::domain, DRW_context_state_get(), drw_curves_cache_get(), drw_curves_get_attribute_sampler_name(), DRW_shgroup_add_material_resources(), DRW_shgroup_buffer_texture(), DRW_shgroup_call_no_cull, DRW_shgroup_create_sub(), DRW_shgroup_uniform_block, DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_int(), DRW_shgroup_uniform_int_copy(), DRW_shgroup_uniform_mat4_copy(), DST, blender::draw::CurvesEvalCache::final, blender::IndexRange::first(), g_dummy_vbo, Curves::geometry, blender::IndexRange::last(), blender::draw::DRW_AttributeRequest::layer_index, blender::draw::DRW_Attributes::num_requests, blender::bke::Point, CurvesGeometry::point_data, blender::draw::CurvesEvalCache::proc_attributes_buf, blender::draw::CurvesEvalFinalCache::proc_buf, blender::draw::CurvesEvalFinalCache::proc_hairs, blender::draw::CurvesEvalCache::proc_length_buf, blender::draw::detail::UniformCommon< T, len, device_only >::push_update(), blender::draw::DRW_Attributes::requests, blender::draw::CurvesEvalFinalCache::resolution, blender::math::safe_divide(), SCE_HAIR_SHAPE_STRAND, DRWContextState::scene, blender::IndexRange::size(), and DRWManager::vmempool.

◆ DRW_shgroup_pointcloud_create_sub()

DRWShadingGroup * blender::draw::DRW_shgroup_pointcloud_create_sub ( Object * object,
DRWShadingGroup * shgrp_parent,
GPUMaterial * gpu_material )

◆ DRW_subdiv_cache_free()

◆ drw_subdiv_compute_dispatch()

static void blender::draw::drw_subdiv_compute_dispatch ( const DRWSubdivCache & cache,
GPUShader * shader,
const int src_offset,
const int dst_offset,
uint total_dispatch_size,
const bool has_sculpt_mask = false,
const uint edge_loose_offset = 0 )
static

◆ DRW_subdiv_free()

◆ DRW_subdivide_loose_geom()

◆ DRW_vertbuf_create_wiredata()

◆ DRW_volume_batch_cache_dirty_tag()

void blender::draw::DRW_volume_batch_cache_dirty_tag ( Volume * volume,
int mode )

◆ DRW_volume_batch_cache_free()

void blender::draw::DRW_volume_batch_cache_free ( Volume * volume)

Definition at line 133 of file draw_cache_impl_volume.cc.

References MEM_SAFE_FREE, and volume_batch_cache_clear().

◆ DRW_volume_batch_cache_get_grid()

DRWVolumeGrid * blender::draw::DRW_volume_batch_cache_get_grid ( Volume * volume,
const bke::VolumeGridData * volume_grid )

◆ DRW_volume_batch_cache_get_selection_surface()

◆ DRW_volume_batch_cache_get_wireframes_face()

◆ DRW_volume_batch_cache_validate()

void blender::draw::DRW_volume_batch_cache_validate ( Volume * volume)

◆ DRW_volume_material_count_get()

int blender::draw::DRW_volume_material_count_get ( const Volume * volume)

Definition at line 341 of file draw_cache_impl_volume.cc.

References max_ii().

◆ drw_volume_object_mesh_init()

◆ drw_volume_selection_surface_cb()

◆ drw_volume_wireframe_cb()

◆ edge_factor_calc()

template<typename T >
T blender::draw::edge_factor_calc ( const float3 & a,
const float3 & b )

Calculates a factor that is used to identify the minimum angle in the shader to display an edge. NOTE: Keep in sync with common_subdiv_vbo_edge_fac_comp.glsl.

Referenced by extract_edge_factor_mesh().

◆ edge_factor_calc< float >()

template<>
float blender::draw::edge_factor_calc< float > ( const float3 & a,
const float3 & b )
inline

Definition at line 34 of file extract_mesh_vbo_edge_fac.cc.

References b, CLAMP, and blender::math::dot().

◆ edge_factor_calc< uint8_t >()

template<>
uint8_t blender::draw::edge_factor_calc< uint8_t > ( const float3 & a,
const float3 & b )
inline

Definition at line 46 of file extract_mesh_vbo_edge_fac.cc.

References b, CLAMP, and blender::math::dot().

◆ edge_from_corners()

static uint2 blender::draw::edge_from_corners ( const IndexRange face,
const int corner )
static

Definition at line 43 of file extract_mesh_ibo_lines.cc.

References blender::bke::mesh::face_corner_next().

◆ edge_len_calc()

static int blender::draw::edge_len_calc ( int u,
int v,
int w )
static

Definition at line 45 of file draw_cache_impl_lattice.cc.

References v, and w().

Referenced by lattice_render_edges_len_get().

◆ edit_points_vert_format_get()

static GPUVertFormat * blender::draw::edit_points_vert_format_get ( uint * r_pos_id,
uint * r_selection_id )
static

◆ editmesh_final_or_this()

◆ edituv_data_format()

static const GPUVertFormat & blender::draw::edituv_data_format ( )
static

◆ edituv_get_edituv_stretch_angle()

static void blender::draw::edituv_get_edituv_stretch_angle ( float auv[2][2],
const float av[2][3],
UVStretchAngle * r_stretch )
static

◆ edituv_request_active_uv()

◆ ensure_attributes()

◆ ensure_control_point_attribute()

◆ ensure_edit_inner_points_count()

◆ ensure_edit_tip_points_count()

◆ ensure_final_attribute()

◆ ensure_seg_pt_count()

◆ ENUM_OPERATORS() [1/2]

blender::draw::ENUM_OPERATORS ( DRWBatchFlag ,
MBC_SURFACE_PER_MAT  )

◆ ENUM_OPERATORS() [2/2]

blender::draw::ENUM_OPERATORS ( SculptBatchFeature ,
SCULPT_BATCH_UV  )

◆ evaluate_vertex_weight()

◆ extract_attr_viewer()

◆ extract_attribute()

◆ extract_attributes()

◆ extract_attributes_subdiv()

◆ extract_data_bmesh_edge()

template<typename T >
static void blender::draw::extract_data_bmesh_edge ( const BMesh & bm,
const int cd_offset,
gpu::VertBuf & vbo )
static

◆ extract_data_bmesh_face()

template<typename T >
static void blender::draw::extract_data_bmesh_face ( const BMesh & bm,
const int cd_offset,
gpu::VertBuf & vbo )
static

◆ extract_data_bmesh_loop()

template<typename T >
static void blender::draw::extract_data_bmesh_loop ( const BMesh & bm,
const int cd_offset,
gpu::VertBuf & vbo )
static

◆ extract_data_bmesh_vert()

template<typename T >
static void blender::draw::extract_data_bmesh_vert ( const BMesh & bm,
const int cd_offset,
gpu::VertBuf & vbo )
static

◆ extract_data_mesh_face()

template<typename T >
static void blender::draw::extract_data_mesh_face ( const OffsetIndices< int > faces,
const Span< T > attribute,
gpu::VertBuf & vbo )
static

◆ extract_data_mesh_mapped_corner()

template<typename T >
static void blender::draw::extract_data_mesh_mapped_corner ( const Span< T > attribute,
const Span< int > indices,
gpu::VertBuf & vbo )
static

◆ extract_edge_factor()

◆ extract_edge_factor_bm()

template<typename T >
static void blender::draw::extract_edge_factor_bm ( const MeshRenderData & mr,
MutableSpan< T > vbo_data )
static

◆ extract_edge_factor_mesh()

◆ extract_edge_factor_subdiv()

◆ extract_edge_idx_loose_geom_subdiv()

◆ extract_edge_index()

◆ extract_edge_index_bm()

◆ extract_edge_index_mesh()

◆ extract_edge_index_subdiv()

◆ extract_edit_data()

◆ extract_edit_data_bm()

◆ extract_edit_data_mesh()

◆ extract_edit_data_subdiv()

◆ extract_edit_subdiv_data_bm()

◆ extract_edit_subdiv_data_mesh()

◆ extract_edituv_data()

◆ extract_edituv_data_bm()

static void blender::draw::extract_edituv_data_bm ( const MeshRenderData & mr,
MutableSpan< EditLoopData > vbo_data )
static

◆ extract_edituv_data_iter_subdiv_bm()

static void blender::draw::extract_edituv_data_iter_subdiv_bm ( const MeshRenderData & mr,
const BMUVOffsets offsets,
const Span< int > subdiv_loop_vert_index,
const Span< int > subdiv_loop_edge_index,
const int subdiv_quad_index,
const BMFace * coarse_quad,
MutableSpan< EditLoopData > vbo_data )
static

◆ extract_edituv_data_mesh()

◆ extract_edituv_data_subdiv()

◆ extract_edituv_face_dots()

◆ extract_edituv_face_dots_bm()

◆ extract_edituv_face_dots_mesh()

◆ extract_edituv_lines()

◆ extract_edituv_lines_bm()

static void blender::draw::extract_edituv_lines_bm ( const MeshRenderData & mr,
const bool sync_selection,
GPUIndexBufBuilder & builder )
static

◆ extract_edituv_lines_mesh()

◆ extract_edituv_lines_subdiv()

◆ extract_edituv_lines_subdiv_bm()

◆ extract_edituv_lines_subdiv_mesh()

◆ extract_edituv_points()

◆ extract_edituv_points_bm()

static void blender::draw::extract_edituv_points_bm ( const MeshRenderData & mr,
const bool sync_selection,
GPUIndexBufBuilder & builder )
static

◆ extract_edituv_points_mesh()

◆ extract_edituv_points_subdiv()

◆ extract_edituv_points_subdiv_bm()

◆ extract_edituv_points_subdiv_mesh()

◆ extract_edituv_stretch_angle()

◆ extract_edituv_stretch_angle_subdiv()

◆ extract_edituv_stretch_area()

◆ extract_edituv_stretch_area_subdiv()

◆ extract_edituv_subdiv_data_bm()

◆ extract_edituv_subdiv_data_mesh()

◆ extract_edituv_tris()

◆ extract_edituv_tris_bm()

static void blender::draw::extract_edituv_tris_bm ( const MeshRenderData & mr,
const bool sync_selection,
GPUIndexBufBuilder & builder )
static

◆ extract_edituv_tris_mesh()

static void blender::draw::extract_edituv_tris_mesh ( const MeshRenderData & mr,
const bool sync_selection,
GPUIndexBufBuilder & builder )
static

◆ extract_edituv_tris_subdiv()

◆ extract_edituv_tris_subdiv_bm()

◆ extract_edituv_tris_subdiv_mesh()

static void blender::draw::extract_edituv_tris_subdiv_mesh ( const MeshRenderData & mr,
const DRWSubdivCache & subdiv_cache,
const bool sync_selection,
GPUIndexBufBuilder & builder )
static

◆ extract_face_dot_index()

◆ extract_face_dot_normals()

◆ extract_face_dot_normals_bm()

template<typename GPUType >
void blender::draw::extract_face_dot_normals_bm ( const MeshRenderData & mr,
MutableSpan< GPUType > normals )

◆ extract_face_dot_normals_mesh()

template<typename GPUType >
static void blender::draw::extract_face_dot_normals_mesh ( const MeshRenderData & mr,
MutableSpan< GPUType > normals )
static

◆ extract_face_dot_positions_bm()

static void blender::draw::extract_face_dot_positions_bm ( const MeshRenderData & mr,
MutableSpan< float3 > vbo_data )
static

◆ extract_face_dot_positions_mesh()

◆ extract_face_dots()

void blender::draw::extract_face_dots ( const MeshRenderData & mr,
gpu::IndexBuf & face_dots )

◆ extract_face_dots_bm()

static void blender::draw::extract_face_dots_bm ( const MeshRenderData & mr,
gpu::IndexBuf & face_dots )
static

◆ extract_face_dots_edituv_data()

◆ extract_face_dots_mesh()

static void blender::draw::extract_face_dots_mesh ( const MeshRenderData & mr,
gpu::IndexBuf & face_dots )
static

Definition at line 45 of file extract_mesh_ibo_fdots.cc.

References calc_face_visibility_mesh(), and index_mask_to_ibo().

Referenced by extract_face_dots().

◆ extract_face_dots_position()

◆ extract_face_dots_subdiv()

◆ extract_face_dots_uv()

◆ extract_face_dots_uv_bm()

static void blender::draw::extract_face_dots_uv_bm ( const MeshRenderData & mr,
MutableSpan< float2 > vbo_data )
static

◆ extract_face_dots_uv_mesh()

◆ extract_face_index()

◆ extract_face_index_bm()

static void blender::draw::extract_face_index_bm ( const MeshRenderData & mr,
MutableSpan< int > vbo_data )
static

◆ extract_face_index_mesh()

◆ extract_face_index_subdiv()

◆ extract_face_normals()

template<typename GPUType >
static void blender::draw::extract_face_normals ( const MeshRenderData & mr,
MutableSpan< GPUType > normals )
static

◆ extract_lines()

void blender::draw::extract_lines ( const MeshRenderData & mr,
gpu::IndexBuf * lines,
gpu::IndexBuf * lines_loose,
bool & no_loose_wire )

◆ extract_lines_adjacency()

◆ extract_lines_adjacency_subdiv()

◆ extract_lines_bm()

◆ extract_lines_loose_geom_subdiv()

◆ extract_lines_mesh()

◆ extract_lines_paint_mask()

◆ extract_lines_paint_mask_subdiv()

◆ extract_lines_subdiv()

◆ extract_loose_positions_subdiv()

◆ extract_mesh_analysis()

◆ extract_mesh_loose_edge_data()

template<typename T >
void blender::draw::extract_mesh_loose_edge_data ( const Span< T > vert_data,
const Span< int2 > edges,
const Span< int > loose_edges,
MutableSpan< T > gpu_data )

◆ extract_normals()

◆ extract_normals_bm()

template<typename GPUType >
static void blender::draw::extract_normals_bm ( const MeshRenderData & mr,
MutableSpan< GPUType > normals )
static

◆ extract_normals_mesh()

◆ extract_normals_subdiv()

◆ extract_orco()

◆ extract_paint_overlay_flags()

◆ extract_points()

◆ extract_points_bm()

◆ extract_points_mesh()

◆ extract_points_subdiv()

◆ extract_points_subdiv_bm()

◆ extract_points_subdiv_mesh()

◆ extract_positions()

◆ extract_positions_bm()

◆ extract_positions_mesh()

◆ extract_positions_subdiv()

void blender::draw::extract_positions_subdiv ( const DRWSubdivCache & subdiv_cache,
const MeshRenderData & mr,
gpu::VertBuf & vbo,
gpu::VertBuf * orco_vbo )

◆ extract_sculpt_data()

◆ extract_sculpt_data_subdiv()

◆ extract_set_bits()

static void blender::draw::extract_set_bits ( const BitSpan bits,
MutableSpan< int > indices )
static

◆ extract_skin_roots()

◆ extract_tan_init_common()

static void blender::draw::extract_tan_init_common ( const MeshRenderData & mr,
const MeshBatchCache & cache,
GPUVertFormat * format,
GPUVertCompType comp_type,
GPUVertFetchMode fetch_mode,
CustomData * r_loop_data,
int * r_v_len,
int * r_tan_len,
char r_tangent_names[MAX_MTFACE][MAX_CUSTOMDATA_LAYER_NAME],
bool * r_use_orco_tan )
static

Definition at line 24 of file extract_mesh_vbo_tan.cc.

References BKE_editmesh_loop_tangent_calc(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_orco_verts_transform(), blender::draw::MeshRenderData::bm, bm, blender::draw::MeshRenderData::bm_face_normals, blender::draw::MeshRenderData::bm_loop_normals, BM_vert_at_index(), CD_ORCO, CD_PROP_FLOAT2, CD_TANGENT, blender::draw::MeshBatchCache::cd_used, BMVert::co, copy_v3_v3(), Mesh::corner_data, blender::draw::MeshRenderData::corner_normals, blender::draw::MeshRenderData::corner_tris_num, blender::draw::MeshRenderData::corner_verts, blender::draw::MeshRenderData::corners_num, CustomData_get_active_layer(), CustomData_get_layer(), CustomData_get_layer_index(), CustomData_get_layer_name(), CustomData_get_render_layer(), CustomData_reset(), blender::Span< T >::data(), blender::draw::MeshRenderData::edit_bmesh, blender::draw::MeshRenderData::extract_type, blender::draw::MeshRenderData::face_normals, blender::draw::MeshRenderData::faces, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_MAX_SAFE_ATTR_NAME, GPU_vertformat_alias_add(), GPU_vertformat_attr_add(), GPU_vertformat_deinterleave(), GPU_vertformat_safe_attr_name(), blender::Span< T >::is_empty(), BMesh::ldata, MAX_MTFACE, blender::draw::MeshRenderData::mesh, MR_EXTRACT_BMESH, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::draw::MeshRenderData::sharp_faces, blender::Span< T >::size(), SNPRINTF, STRNCPY, blender::draw::DRW_MeshCDMask::tan, blender::draw::DRW_MeshCDMask::tan_orco, v, BMesh::vdata, Mesh::vert_data, blender::draw::MeshRenderData::vert_positions, and blender::draw::MeshRenderData::verts_num.

Referenced by extract_tangents(), and extract_tangents_subdiv().

◆ extract_tangents()

◆ extract_tangents_subdiv()

◆ extract_tris()

◆ extract_tris_bmesh()

◆ extract_tris_mesh()

◆ extract_tris_subdiv()

◆ extract_uv_maps()

◆ extract_uv_maps_subdiv()

◆ extract_uv_stretch_angle_bm()

◆ extract_uv_stretch_angle_mesh()

◆ extract_vert_idx_loose_geom_subdiv()

◆ extract_vert_index()

◆ extract_vert_index_bm()

◆ extract_vert_index_mesh()

◆ extract_vert_index_subdiv()

◆ extract_vert_normals() [1/2]

◆ extract_vert_normals() [2/2]

template<typename GPUType >
static void blender::draw::extract_vert_normals ( const Span< int > corner_verts,
const Span< float3 > vert_normals,
MutableSpan< GPUType > normals )
static

◆ extract_vert_normals_bm()

◆ extract_vert_normals_mesh()

◆ extract_vertex_flags()

◆ extract_weights()

◆ extract_weights_bm()

◆ extract_weights_mesh()

◆ extract_weights_subdiv()

◆ fill_curve_offsets_vbos()

static void blender::draw::fill_curve_offsets_vbos ( const OffsetIndices< int > points_by_curve,
GPUVertBufRaw & data_step,
GPUVertBufRaw & seg_step )
static

◆ fill_loose_lines_ibo()

static void blender::draw::fill_loose_lines_ibo ( const MeshRenderData & mr,
const IndexMask & visible,
MutableSpan< uint2 > data )
static

◆ fill_points_position_time_vbo()

static void blender::draw::fill_points_position_time_vbo ( const OffsetIndices< int > points_by_curve,
const Span< float3 > positions,
MutableSpan< PositionAndParameter > posTime_data,
MutableSpan< float > hairLength_data )
static

◆ get_batch_cache()

◆ get_blender_patch_coords_format()

static const GPUVertFormat & blender::draw::get_blender_patch_coords_format ( )
static

◆ get_coarse_tan_format()

static const GPUVertFormat & blender::draw::get_coarse_tan_format ( )
static

◆ get_custom_data_for_domain()

static const CustomData * blender::draw::get_custom_data_for_domain ( const BMesh & bm,
bke::AttrDomain domain )
static

◆ get_custom_normals_format()

static const GPUVertFormat & blender::draw::get_custom_normals_format ( )
static

◆ get_dispatch_size()

static uint blender::draw::get_dispatch_size ( uint elements)
static

◆ get_edit_data_format()

static const GPUVertFormat & blender::draw::get_edit_data_format ( )
static

◆ get_edituv_stretch_angle_format_subdiv()

static const GPUVertFormat & blender::draw::get_edituv_stretch_angle_format_subdiv ( )
static

◆ get_fdots_nor_format_subdiv()

static const GPUVertFormat & blender::draw::get_fdots_nor_format_subdiv ( )
static

◆ get_fdots_pos_format()

static const GPUVertFormat & blender::draw::get_fdots_pos_format ( )
static

◆ get_normals_format()

static const GPUVertFormat & blender::draw::get_normals_format ( )
static

◆ get_origindex_format()

static const GPUVertFormat & blender::draw::get_origindex_format ( )
static

◆ get_patch_array_format()

static const GPUVertFormat & blender::draw::get_patch_array_format ( )
static

◆ get_patch_evaluation_shader()

◆ get_patch_handle_format()

static const GPUVertFormat & blender::draw::get_patch_handle_format ( )
static

◆ get_patch_index_format()

static const GPUVertFormat & blender::draw::get_patch_index_format ( )
static

◆ get_patch_param_format()

static const GPUVertFormat & blender::draw::get_patch_param_format ( )
static

◆ get_quadtree_format()

static const GPUVertFormat & blender::draw::get_quadtree_format ( )
static

◆ get_sculpt_data_format()

static const GPUVertFormat & blender::draw::get_sculpt_data_format ( )
static

◆ get_shader_code()

◆ get_shader_name()

◆ get_subdiv_custom_data_shader()

◆ get_subdiv_edge_fac_format()

◆ get_subdiv_lnor_format()

static const GPUVertFormat & blender::draw::get_subdiv_lnor_format ( )
static

◆ get_subdiv_shader()

◆ get_subdiv_vertex_format()

static const GPUVertFormat & blender::draw::get_subdiv_vertex_format ( )
static

◆ get_uvs_format()

static const GPUVertFormat & blender::draw::get_uvs_format ( )
static

◆ gpencil_batch_cache_clear()

◆ gpu_vertbuf_create_from_format()

static gpu::VertBuf * blender::draw::gpu_vertbuf_create_from_format ( const GPUVertFormat & format,
uint len )
static

◆ grease_pencil_batch_cache_clear()

◆ grease_pencil_batch_cache_get()

◆ grease_pencil_batch_cache_init()

◆ grease_pencil_batch_cache_is_edit_discarded()

◆ grease_pencil_batch_cache_valid()

static bool blender::draw::grease_pencil_batch_cache_valid ( const GreasePencil & grease_pencil)
static

◆ grease_pencil_cache_add_nurbs()

static void blender::draw::grease_pencil_cache_add_nurbs ( Object & object,
const bke::greasepencil::Drawing & drawing,
const int layer_index,
IndexMaskMemory & memory,
const VArray< float > & selected_point,
const float4x4 & layer_space_to_object_space,
MutableSpan< float3 > edit_line_points,
MutableSpan< float > edit_line_selection,
int * r_drawing_line_start_offset,
int * r_total_line_ids_num )
static

◆ grease_pencil_color_format()

static GPUVertFormat * blender::draw::grease_pencil_color_format ( )
static

◆ grease_pencil_edit_batch_ensure()

static void blender::draw::grease_pencil_edit_batch_ensure ( Object & object,
const GreasePencil & grease_pencil,
const Scene & scene )
static

Definition at line 678 of file draw_cache_impl_grease_pencil.cc.

References blender::MutableSpan< T >::as_span(), GPUVertFormat::attr_len, blender::Array< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert, blender::array_utils::copy(), blender::array_utils::count_booleans(), CURVE_TYPE_POLY, blender::gpu::VertBuf::data(), blender::draw::GreasePencilBatchCache::edit_line_indices, blender::draw::GreasePencilBatchCache::edit_line_pos, blender::draw::GreasePencilBatchCache::edit_line_selection, blender::draw::GreasePencilBatchCache::edit_lines, blender::draw::GreasePencilBatchCache::edit_points, blender::draw::GreasePencilBatchCache::edit_points_indices, blender::draw::GreasePencilBatchCache::edit_points_pos, blender::draw::GreasePencilBatchCache::edit_points_selection, blender::draw::GreasePencilBatchCache::edit_points_vflag, blender::Array< T, InlineBufferCapacity, Allocator >::end(), blender::bke::CurvesGeometry::evaluated_points_num(), blender::array_utils::gather(), blender::offset_indices::gather_group_sizes(), GPU_batch_create, GPU_batch_vertbuf_add(), GPU_COMP_F32, GPU_COMP_U32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_indexbuf_build(), GPU_indexbuf_init_ex(), GPU_PRIM_LINE_STRIP, GPU_PRIM_POINTS, GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_USAGE_STATIC, GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_get_vertex_len(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), grease_pencil_batch_cache_is_edit_discarded(), grease_pencil_cache_add_nurbs(), GREASE_PENCIL_EDIT_STROKE_END, GREASE_PENCIL_EDIT_STROKE_START, grease_pencil_get_visible_non_nurbs_curves(), grease_pencil_get_visible_nurbs_points(), index_buf_add_bezier_line_points(), index_buf_add_bezier_lines(), index_buf_add_line_points(), index_buf_add_nurbs_lines(), index_buf_add_points(), blender::index_mask::IndexMask::index_range(), blender::draw::GreasePencilBatchCache::is_dirty, blender::index_mask::IndexMask::is_empty(), blender::index_mask::masked_fill(), blender::threading::parallel_for(), blender::bke::Point, blender::bke::CurvesGeometry::points_num(), blender::ed::greasepencil::retrieve_editable_and_selected_points(), blender::ed::greasepencil::retrieve_editable_and_selected_strokes(), blender::ed::greasepencil::retrieve_visible_bezier_handle_points(), blender::ed::greasepencil::retrieve_visible_drawings(), GreasePencil::runtime, blender::index_mask::IndexMask::size(), and blender::MutableSpan< T >::slice().

Referenced by DRW_cache_grease_pencil_edit_lines_get(), and DRW_cache_grease_pencil_edit_points_get().

◆ grease_pencil_geom_batch_ensure()

static void blender::draw::grease_pencil_geom_batch_ensure ( Object & object,
const GreasePencil & grease_pencil,
const Scene & scene )
static

Definition at line 1056 of file draw_cache_impl_grease_pencil.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), attribute_interpolate(), BLI_assert, blender::index_mask::IndexMask::contains(), copy_v2_v2(), copy_v3_v3(), copy_v4_v4(), blender::bke::Curve, blender::gpu::VertBuf::data(), blender::ed::greasepencil::DrawingInfo::drawing, blender::bke::greasepencil::Drawing::fill_colors(), blender::IndexRange::first(), blender::MutableSpan< T >::first(), blender::index_mask::IndexMask::foreach_index(), blender::draw::GreasePencilBatchCache::geom_batch, GP_IS_STROKE_VERTEX_BIT, GP_STROKE_CAP_TYPE_ROUND, GP_VERTEX_ID_SHIFT, GPENCIL_MATERIAL_BUFFER_LEN, GPU_batch_create, GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_TRIS, GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_USAGE_STATIC, GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), grease_pencil_color_format(), grease_pencil_stroke_format(), blender::draw::GreasePencilBatchCache::ibo, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), int, blender::math::invert(), is_cyclic(), blender::draw::GreasePencilBatchCache::is_dirty, blender::MutableSpan< T >::last(), blender::ed::greasepencil::DrawingInfo::layer_index, blender::bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR, blender::math::max(), blender::bke::greasepencil::Drawing::opacities(), pack_rotation_aspect_hardness(), blender::bke::Point, pos, blender::bke::greasepencil::Drawing::radii(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::ed::greasepencil::retrieve_visible_strokes(), GreasePencil::runtime, blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::index_mask::IndexMask::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::texture_matrices(), blender::math::transform_point(), blender::bke::greasepencil::Drawing::triangles(), blender::draw::GreasePencilBatchCache::vbo, blender::draw::GreasePencilBatchCache::vbo_col, and verts.

Referenced by DRW_cache_grease_pencil_color_buffer_get(), DRW_cache_grease_pencil_get(), DRW_cache_grease_pencil_position_buffer_get(), and grease_pencil_wire_batch_ensure().

◆ grease_pencil_get_visible_non_nurbs_curves()

◆ grease_pencil_get_visible_nurbs_curves()

◆ grease_pencil_get_visible_nurbs_points()

◆ grease_pencil_stroke_format()

static GPUVertFormat * blender::draw::grease_pencil_stroke_format ( )
static

◆ grease_pencil_weight_batch_ensure()

static void blender::draw::grease_pencil_weight_batch_ensure ( Object & object,
const GreasePencil & grease_pencil,
const Scene & scene )
static

Definition at line 236 of file draw_cache_impl_grease_pencil.cc.

References GPUVertFormat::attr_len, blender::Array< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert, BLI_findlink(), blender::array_utils::count_booleans(), blender::gpu::VertBuf::data(), blender::draw::GreasePencilBatchCache::edit_line_indices, blender::draw::GreasePencilBatchCache::edit_lines, blender::draw::GreasePencilBatchCache::edit_points, blender::draw::GreasePencilBatchCache::edit_points_indices, blender::draw::GreasePencilBatchCache::edit_points_pos, blender::draw::GreasePencilBatchCache::edit_points_selection, blender::Array< T, InlineBufferCapacity, Allocator >::end(), blender::index_mask::IndexMask::foreach_index(), blender::offset_indices::gather_group_sizes(), GPU_batch_create, GPU_batch_vertbuf_add(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), GPU_indexbuf_build(), GPU_indexbuf_init_ex(), GPU_PRIM_LINE_STRIP, GPU_PRIM_POINTS, GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_USAGE_STATIC, GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_get_vertex_len(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), grease_pencil_batch_cache_is_edit_discarded(), is_cyclic(), blender::draw::GreasePencilBatchCache::is_dirty, blender::VArrayCommon< T >::materialize(), bDeformGroup::name, blender::threading::parallel_for(), blender::bke::Point, blender::bke::CurvesGeometry::points_num(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::ed::greasepencil::retrieve_visible_strokes(), GreasePencil::runtime, blender::index_mask::IndexMask::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::MutableSpan< T >::slice(), GreasePencil::vertex_group_active_index, and GreasePencil::vertex_group_names.

Referenced by DRW_cache_grease_pencil_weight_lines_get(), and DRW_cache_grease_pencil_weight_points_get().

◆ grease_pencil_wire_batch_ensure()

◆ hair_free()

void blender::draw::hair_free ( )

◆ hair_init()

◆ hair_particle_cache_get()

◆ hair_pos_buffer_get()

◆ hair_sub_pass_setup()

gpu::Batch * blender::draw::hair_sub_pass_setup ( PassMain::Sub & sub_ps,
const Scene * scene,
Object * object,
ParticleSystem * psys,
ModifierData * md,
GPUMaterial * gpu_material = nullptr )

◆ hair_sub_pass_setup_implementation()

◆ hair_update()

◆ index_buf_add_bezier_line_points()

static void blender::draw::index_buf_add_bezier_line_points ( Object & object,
const bke::greasepencil::Drawing & drawing,
int layer_index,
GPUIndexBufBuilder * epb,
IndexMaskMemory & memory,
int * r_drawing_start_offset )
static

◆ index_buf_add_bezier_lines()

◆ index_buf_add_line_points()

◆ index_buf_add_nurbs_lines()

◆ index_buf_add_points()

◆ index_mask_to_ibo()

static void blender::draw::index_mask_to_ibo ( const IndexMask & mask,
gpu::IndexBuf & ibo )
static

◆ init_batch_cache()

static void blender::draw::init_batch_cache ( Curves & curves)
static

◆ init_format_for_attribute()

◆ init_vbo_data()

◆ init_vbo_for_attribute()

◆ lattice_batch_cache_clear()

◆ lattice_batch_cache_create_overlay_batches()

◆ lattice_batch_cache_get()

◆ lattice_batch_cache_get_edges()

◆ lattice_batch_cache_get_pos()

◆ lattice_batch_cache_init()

◆ lattice_batch_cache_valid()

◆ lattice_render_data_create()

◆ lattice_render_data_edges_len_get()

static int blender::draw::lattice_render_data_edges_len_get ( const LatticeRenderData * rdata)
static

◆ lattice_render_data_free()

static void blender::draw::lattice_render_data_free ( LatticeRenderData * rdata)
static

◆ lattice_render_data_vert_bpoint()

static const BPoint * blender::draw::lattice_render_data_vert_bpoint ( const LatticeRenderData * rdata,
const int vert_idx )
static

◆ lattice_render_data_verts_len_get()

◆ lattice_render_edges_len_get()

static int blender::draw::lattice_render_edges_len_get ( Lattice * lt)
static

◆ lattice_render_verts_len_get()

static int blender::draw::lattice_render_verts_len_get ( Lattice * lt)
static

◆ lines_adjacency_triangle()

void blender::draw::lines_adjacency_triangle ( uint3 vert_tri,
uint3 corner_tri,
MutableSpan< int > vert_to_corner,
Map< OrderedEdge, int > & edge_hash,
GPUIndexBufBuilder & elb,
bool & is_manifold )
inline

◆ make_patch_coord()

MINLINE CompressedPatchCoord blender::draw::make_patch_coord ( int ptex_face_index,
float u,
float v )

Definition at line 448 of file draw_cache_impl_subdivision.cc.

References v.

Referenced by draw_subdiv_build_cache(), and draw_subdiv_loop_cb().

◆ mesh_batch_cache_add_request()

BLI_INLINE void blender::draw::mesh_batch_cache_add_request ( MeshBatchCache & cache,
DRWBatchFlag new_flag )

◆ mesh_batch_cache_check_vertex_group()

◆ mesh_batch_cache_clear()

◆ mesh_batch_cache_discard_batch()

◆ mesh_batch_cache_discard_shaded_tri()

◆ mesh_batch_cache_discard_surface_batches()

◆ mesh_batch_cache_discard_uvedit()

◆ mesh_batch_cache_discard_uvedit_select()

static void blender::draw::mesh_batch_cache_discard_uvedit_select ( MeshBatchCache & cache)
static

◆ mesh_batch_cache_ensure_subdiv_cache()

static DRWSubdivCache & blender::draw::mesh_batch_cache_ensure_subdiv_cache ( MeshBatchCache & mbc)
static

◆ mesh_batch_cache_free_subdiv_cache()

static void blender::draw::mesh_batch_cache_free_subdiv_cache ( MeshBatchCache & cache)
static

◆ mesh_batch_cache_get()

static MeshBatchCache * blender::draw::mesh_batch_cache_get ( Mesh & mesh)
static

Definition at line 616 of file draw_cache_impl_mesh.cc.

Referenced by drw_mesh_batch_cache_check_available(), 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_loop_normals(), 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_vert_normals(), DRW_mesh_batch_cache_get_edit_vertices(), 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_viewer_attribute(), 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()

◆ mesh_batch_cache_request_surface_batches()

◆ mesh_batch_cache_valid()

static bool blender::draw::mesh_batch_cache_valid ( Object & object,
Mesh & mesh )
static

◆ mesh_buffer_cache_clear()

◆ mesh_buffer_cache_create_requested()

void blender::draw::mesh_buffer_cache_create_requested ( TaskGraph & task_graph,
MeshBatchCache & cache,
MeshBufferCache & mbc,
Object & object,
Mesh & mesh,
bool is_editmode,
bool is_paint_mode,
bool edit_mode_active,
const float4x4 & object_to_world,
bool do_final,
bool do_uvedit,
const Scene & scene,
const ToolSettings * ts,
bool use_hide )

Definition at line 105 of file draw_cache_extract_mesh.cc.

References any_attr_requested(), BLI_task_graph_edge_create(), BLI_task_graph_node_create(), BLI_task_graph_node_push_work(), BLI_task_graph_work_and_wait(), BLI_time_now_seconds(), blender::draw::MeshBufferCache::buff, buffers, DRW_ibo_requested(), DRW_vbo_requested(), extract_attr_viewer(), extract_attributes(), extract_edge_factor(), extract_edge_index(), extract_edit_data(), extract_edituv_data(), extract_edituv_face_dots(), extract_edituv_lines(), extract_edituv_points(), extract_edituv_stretch_angle(), extract_edituv_stretch_area(), extract_edituv_tris(), extract_face_dot_index(), extract_face_dot_normals(), extract_face_dots(), extract_face_dots_edituv_data(), extract_face_dots_position(), extract_face_dots_uv(), extract_face_index(), extract_lines(), extract_lines_adjacency(), extract_lines_paint_mask(), extract_mesh_analysis(), extract_normals(), extract_orco(), extract_points(), extract_positions(), extract_sculpt_data(), extract_skin_roots(), extract_tangents(), extract_tris(), extract_uv_maps(), extract_vert_index(), extract_vert_normals(), extract_weights(), GPU_use_hq_normals_workaround(), blender::draw::MeshRenderData::mesh, mesh_extract_render_data_node_exec(), mesh_render_data_create(), mesh_render_data_faces_sorted_ensure(), printf, R_SIMPLIFY, R_SIMPLIFY_NORMALS, Mesh::runtime, SCE_PERF_HQ_NORMALS, blender::draw::MeshRenderData::use_final_mesh, blender::draw::MeshRenderData::use_simplify_normals, and blender::draw::MeshRenderData::use_subsurf_fdots.

Referenced by DRW_mesh_batch_cache_create_requested().

◆ mesh_buffer_cache_create_requested_subdiv()

◆ mesh_buffer_list_clear()

static void blender::draw::mesh_buffer_list_clear ( MeshBufferList * mbuflist)
static

◆ mesh_cd_calc_active_mask_uv_layer()

static void blender::draw::mesh_cd_calc_active_mask_uv_layer ( const Object & object,
const Mesh & mesh,
DRW_MeshCDMask & cd_used )
static

◆ mesh_cd_calc_active_uv_layer()

static void blender::draw::mesh_cd_calc_active_uv_layer ( const Object & object,
const Mesh & mesh,
DRW_MeshCDMask & cd_used )
static

◆ mesh_cd_calc_edit_uv_layer()

static void blender::draw::mesh_cd_calc_edit_uv_layer ( const Mesh & ,
DRW_MeshCDMask * cd_used )
static

Definition at line 244 of file draw_cache_impl_mesh.cc.

References blender::draw::DRW_MeshCDMask::edit_uv.

Referenced by edituv_request_active_uv().

◆ mesh_cd_calc_used_gpu_layers()

◆ mesh_cd_edata_get_from_mesh()

const CustomData & blender::draw::mesh_cd_edata_get_from_mesh ( const Mesh & mesh)

◆ mesh_cd_layers_type_clear()

◆ mesh_cd_layers_type_equal()

BLI_INLINE bool blender::draw::mesh_cd_layers_type_equal ( DRW_MeshCDMask a,
DRW_MeshCDMask b )

Definition at line 227 of file draw_cache_impl_mesh.cc.

References b.

Referenced by DRW_mesh_batch_cache_free_old().

◆ mesh_cd_layers_type_merge()

◆ mesh_cd_layers_type_overlap()

BLI_INLINE bool blender::draw::mesh_cd_layers_type_overlap ( DRW_MeshCDMask a,
DRW_MeshCDMask b )

Definition at line 222 of file draw_cache_impl_mesh.cc.

References b.

Referenced by DRW_mesh_batch_cache_create_requested().

◆ mesh_cd_ldata_get_from_mesh()

◆ mesh_cd_pdata_get_from_mesh()

const CustomData & blender::draw::mesh_cd_pdata_get_from_mesh ( const Mesh & mesh)

◆ mesh_cd_vdata_get_from_mesh()

◆ mesh_extract_render_data_node_exec()

◆ mesh_extract_uv_format_init()

◆ mesh_is_single_material()

static bool blender::draw::mesh_is_single_material ( const OffsetIndices< int > material_tri_starts)
static

◆ mesh_render_data_create()

◆ mesh_render_data_edge_flag()

◆ mesh_render_data_face_flag()

◆ mesh_render_data_faces_sorted_build()

◆ mesh_render_data_faces_sorted_ensure()

◆ mesh_render_data_loop_edge_flag()

void blender::draw::mesh_render_data_loop_edge_flag ( const MeshRenderData & mr,
const BMLoop * l,
const BMUVOffsets offsets,
EditLoopData & eattr )

◆ mesh_render_data_loop_flag()

◆ mesh_render_data_loose_edges_bm()

◆ mesh_render_data_loose_geom_build()

◆ mesh_render_data_loose_geom_ensure()

◆ mesh_render_data_loose_geom_mesh()

static void blender::draw::mesh_render_data_loose_geom_mesh ( const MeshRenderData & mr,
MeshBufferCache & cache )
static

◆ mesh_render_data_loose_verts_bm()

◆ mesh_render_data_mat_tri_len_build()

◆ mesh_render_data_update_corner_normals()

◆ mesh_render_data_update_face_normals()

◆ mesh_render_data_update_loose_geom()

◆ mesh_render_data_vert_flag()

◆ mesh_render_mat_len_get()

int blender::draw::mesh_render_mat_len_get ( const Object & object,
const Mesh & mesh )

◆ opensubdiv_gpu_buffer_init()

◆ overhang_remap()

BLI_INLINE float blender::draw::overhang_remap ( float fac,
float min,
float max,
float minmax_irange )

Definition at line 36 of file extract_mesh_vbo_mesh_analysis.cc.

References CLAMP, and min.

Referenced by statvis_calc_overhang().

◆ pack_rotation_aspect_hardness()

BLI_INLINE int32_t blender::draw::pack_rotation_aspect_hardness ( float rot,
float asp,
float softness )

Definition at line 195 of file draw_cache_impl_grease_pencil.cc.

References cosf, rot, and unit_float_to_uchar_clamp.

Referenced by grease_pencil_geom_batch_ensure().

◆ particle_batch_cache_clear()

◆ particle_batch_cache_clear_hair()

◆ particle_batch_cache_clear_point()

static void blender::draw::particle_batch_cache_clear_point ( ParticlePointCache * point_cache)
static

◆ particle_batch_cache_ensure_edit_inner_pos()

◆ particle_batch_cache_ensure_edit_pos_and_seg()

◆ particle_batch_cache_ensure_edit_tip_pos()

◆ particle_batch_cache_ensure_pos()

◆ particle_batch_cache_ensure_pos_and_seg()

static void blender::draw::particle_batch_cache_ensure_pos_and_seg ( PTCacheEdit * edit,
ParticleSystem * psys,
ModifierData * md,
ParticleHairCache * hair_cache )
static

◆ particle_batch_cache_ensure_procedural_final_points()

◆ particle_batch_cache_ensure_procedural_indices()

◆ particle_batch_cache_ensure_procedural_pos()

◆ particle_batch_cache_ensure_procedural_strand_data()

static void blender::draw::particle_batch_cache_ensure_procedural_strand_data ( PTCacheEdit * edit,
ParticleSystem * psys,
ModifierData * md,
ParticleHairCache * cache )
static

Definition at line 843 of file draw_cache_impl_particles.cc.

References Mesh::active_color_attribute, BKE_mesh_tessface_ensure(), BLI_array_alloca, CD_MCOL, CD_MTFACE, CD_PROP_BYTE_COLOR, CD_PROP_FLOAT2, ParticleSystem::childcache, ParticleHairCache::col_layer_names, ParticleHairCache::col_tex, Mesh::corner_data, CustomData_get_active_layer(), CustomData_get_layer_n(), CustomData_get_layer_name(), CustomData_get_named_layer(), CustomData_get_render_layer(), CustomData_has_layer(), CustomData_number_of_layers(), Mesh::default_color_attribute, ParticleSettings::disp, ParticleSettings::draw, Mesh::fdata_legacy, float, GPU_COMP_F32, GPU_COMP_U16, GPU_COMP_U32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_MAX_SAFE_ATTR_NAME, GPU_texture_create_from_vertbuf(), GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_USAGE_STATIC, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), GPU_vertformat_safe_attr_name(), MAX_MTFACE, MEM_calloc_arrayN, MEM_freeN(), MEM_SAFE_FREE, ParticleSystemModifierData::mesh_final, ParticleHairCache::num_col_layers, ParticleHairCache::num_uv_layers, ParticleSystem::part, PART_DRAW_PARENT, particle_batch_cache_fill_strands_data(), PARTICLE_SOURCE_CHILDREN, PARTICLE_SOURCE_PARENT, ParticleSystem::pathcache, PTCacheEdit::pathcache, ParticleHairCache::proc_col_buf, ParticleHairCache::proc_strand_buf, ParticleHairCache::proc_strand_seg_buf, ParticleHairCache::proc_uv_buf, SNPRINTF, ParticleHairCache::strands_len, STRNCPY, PTCacheEdit::totcached, ParticleSystem::totchild, ParticleSystem::totpart, ParticleHairCache::uv_layer_names, and ParticleHairCache::uv_tex.

Referenced by particles_ensure_procedural_data().

◆ particle_batch_cache_fill_segments()

static int blender::draw::particle_batch_cache_fill_segments ( ParticleSystem * psys,
ParticleSystemModifierData * psmd,
ParticleCacheKey ** path_cache,
const ParticleSource particle_source,
const int global_offset,
const int start_index,
const int num_path_keys,
const int num_uv_layers,
const int num_col_layers,
const MTFace ** mtfaces,
const MCol ** mcols,
uint * uv_id,
uint * col_id,
float(***) r_parent_uvs[2],
MCol *** r_parent_mcol,
GPUIndexBufBuilder * elb,
HairAttributeID * attr_id,
ParticleHairCache * hair_cache )
static

◆ particle_batch_cache_fill_segments_edit()

◆ particle_batch_cache_fill_segments_indices()

static int blender::draw::particle_batch_cache_fill_segments_indices ( ParticleCacheKey ** path_cache,
const int start_index,
const int num_path_keys,
const int res,
GPUIndexBufBuilder * elb )
static

◆ particle_batch_cache_fill_segments_proc_pos()

static void blender::draw::particle_batch_cache_fill_segments_proc_pos ( ParticleCacheKey ** path_cache,
const int num_path_keys,
GPUVertBufRaw * attr_step,
GPUVertBufRaw * length_step )
static

◆ particle_batch_cache_fill_strands_data()

static int blender::draw::particle_batch_cache_fill_strands_data ( ParticleSystem * psys,
ParticleSystemModifierData * psmd,
ParticleCacheKey ** path_cache,
const ParticleSource particle_source,
const int start_index,
const int num_path_keys,
GPUVertBufRaw * data_step,
GPUVertBufRaw * seg_step,
float(***) r_parent_uvs[2],
GPUVertBufRaw * uv_step,
const MTFace ** mtfaces,
int num_uv_layers,
MCol *** r_parent_mcol,
GPUVertBufRaw * col_step,
const MCol ** mcols,
int num_col_layers )
static

◆ particle_batch_cache_get()

◆ particle_batch_cache_init()

static void blender::draw::particle_batch_cache_init ( ParticleSystem * psys)
static

◆ particle_batch_cache_valid()

static bool blender::draw::particle_batch_cache_valid ( ParticleSystem * psys)
static

◆ particle_calculate_mcol()

static void blender::draw::particle_calculate_mcol ( ParticleSystem * psys,
ParticleSystemModifierData * psmd,
const bool is_simple,
const int num_col_layers,
const int parent_index,
const int child_index,
const MCol ** mcols,
MCol ** r_parent_mcol,
MCol ** r_mcol )
static

◆ particle_calculate_parent_mcol()

◆ particle_calculate_parent_uvs()

◆ particle_calculate_uvs()

static void blender::draw::particle_calculate_uvs ( ParticleSystem * psys,
ParticleSystemModifierData * psmd,
const bool is_simple,
const int num_uv_layers,
const int parent_index,
const int child_index,
const MTFace ** mtfaces,
float(**) r_parent_uvs[2],
float(**) r_uv[2] )
static

◆ particle_interpolate_children_mcol()

◆ particle_interpolate_children_uvs()

◆ particle_key_weight()

static float blender::draw::particle_key_weight ( const ParticleData * particle,
int strand,
float t )
static

Definition at line 666 of file draw_cache_impl_particles.cc.

References floorf, int, interp(), and HairKey::weight.

Referenced by particle_batch_cache_fill_segments_edit().

◆ particle_pack_mcol()

static void blender::draw::particle_pack_mcol ( MCol * mcol,
ushort r_scol[3] )
static

◆ particles_ensure_procedural_data()

◆ point_cloud_sub_pass_setup()

gpu::Batch * blender::draw::point_cloud_sub_pass_setup ( PassMain::Sub & sub_ps,
Object * object,
GPUMaterial * gpu_material = nullptr )

◆ point_cloud_sub_pass_setup_implementation()

template<typename PassT >
gpu::Batch * blender::draw::point_cloud_sub_pass_setup_implementation ( PassT & sub_ps,
Object * object,
GPUMaterial * gpu_material )

◆ pointcloud_batch_cache_clear()

◆ pointcloud_batch_cache_get()

◆ pointcloud_batch_cache_init()

◆ pointcloud_batch_cache_valid()

◆ pointcloud_discard_attributes()

◆ pointcloud_extract_attribute()

◆ pointcloud_extract_indices()

◆ pointcloud_extract_position_and_radius()

◆ pointcloud_position_and_radius_get()

◆ pointcloud_surface_get()

◆ pointcloud_surface_shaded_get()

◆ process_ibo_verts_bm()

template<typename Fn >
static void blender::draw::process_ibo_verts_bm ( const MeshRenderData & mr,
const Fn & process_vert_fn )
static

◆ process_ibo_verts_mesh()

template<typename Fn >
static void blender::draw::process_ibo_verts_mesh ( const MeshRenderData & mr,
const Fn & process_vert_fn )
static

Fill the index buffer in a parallel non-deterministic fashion. This is okay because any of the possible face corner indices are correct, since they all correspond to the same Mesh vertex. The separate arrays exist as a performance optimization to avoid writing to the VBO.

Definition at line 41 of file extract_mesh_ibo_points.cc.

References blender::draw::MeshRenderData::corner_verts, blender::Span< T >::index_range(), and blender::threading::parallel_for().

◆ request_active_and_default_color_attributes()

◆ request_attribute()

◆ retrieve_active_attribute_names()

◆ rotate_vector()

void blender::draw::rotate_vector ( uint3 & value)
inline

Definition at line 49 of file extract_mesh_ibo_lines_adjacency.cc.

Referenced by lines_adjacency_triangle().

◆ sculpt_batches_get()

◆ sculpt_batches_get_ex()

◆ sculpt_batches_per_material_get()

◆ sharp_remap()

BLI_INLINE float blender::draw::sharp_remap ( float fac,
float min,
float ,
float minmax_irange )

Definition at line 464 of file extract_mesh_vbo_mesh_analysis.cc.

References CLAMP, and min.

Referenced by statvis_calc_sharp().

◆ single_attr_vbo_format()

static GPUVertFormat blender::draw::single_attr_vbo_format ( const char * name,
const GPUVertCompType comp_type,
const uint comp_len,
const GPUVertFetchMode fetch_mode,
uint & attr_id = DUMMY_ID )
static

◆ skip_bm_face()

◆ statvis_calc_distort()

◆ statvis_calc_intersect()

◆ statvis_calc_overhang()

◆ statvis_calc_sharp()

◆ statvis_calc_thickness()

static void blender::draw::statvis_calc_thickness ( const MeshRenderData & mr,
MutableSpan< float > r_thickness )
static

Definition at line 123 of file extract_mesh_vbo_mesh_analysis.cc.

References BKE_bmbvh_free(), BKE_bmbvh_new_from_editmesh(), BKE_bmbvh_ray_cast(), BKE_bvhtree_from_mesh_get(), BLI_assert, BLI_bvhtree_ray_cast(), BLI_jitter_init(), bm, BMEditMesh::bm, BM_elem_index_get, BM_FACE, bm_face_no_get(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_index_ensure(), bm_vert_co_get(), BVHTREE_FROM_CORNER_TRIS, copy_vn_fl(), blender::draw::MeshRenderData::corner_tris_num, blender::draw::MeshRenderData::corner_verts, blender::draw::MeshRenderData::corners_num, blender::math::cos(), blender::MutableSpan< T >::data(), blender::Span< T >::data(), dot_v3v3(), blender::draw::MeshRenderData::edit_bmesh, blender::draw::MeshRenderData::extract_type, fabsf, blender::draw::MeshRenderData::face_normals, blender::draw::MeshRenderData::faces, blender::draw::MeshRenderData::faces_num, BVHTreeRayHit::index, blender::Span< T >::index_range(), interp_v3_v3v3v3_uv(), BMFace::len, BMEditMesh::looptris, madd_v3_v3fl(), mat4_to_scale(), blender::draw::MeshRenderData::mesh, min, MR_EXTRACT_BMESH, normal_tri_v3(), blender::draw::MeshRenderData::object_to_world, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), BVHTreeFromMesh::raycast_callback, blender::math::scale(), ToolSettings::statvis, MeshStatVis::thickness_max, MeshStatVis::thickness_min, thickness_remap(), MeshStatVis::thickness_samples, blender::draw::MeshRenderData::toolsettings, tree, uv_from_jitter_v2(), v, and blender::draw::MeshRenderData::vert_positions.

Referenced by extract_mesh_analysis().

◆ subdiv_edges_per_coarse_edge()

int blender::draw::subdiv_edges_per_coarse_edge ( const DRWSubdivCache & cache)
inline

For every coarse edge, there are resolution - 1 subdivided edges.

Definition at line 260 of file draw_subdivision.hh.

References blender::draw::DRWSubdivCache::resolution.

Referenced by extract_lines_loose_geom_subdiv(), extract_loose_positions_subdiv(), subdiv_loose_edges_num(), and subdiv_verts_per_coarse_edge().

◆ subdiv_full_vbo_size()

int blender::draw::subdiv_full_vbo_size ( const MeshRenderData & mr,
const DRWSubdivCache & cache )
inline

◆ subdiv_loose_edges_num()

int blender::draw::subdiv_loose_edges_num ( const MeshRenderData & mr,
const DRWSubdivCache & cache )
inline

◆ subdiv_verts_per_coarse_edge()

int blender::draw::subdiv_verts_per_coarse_edge ( const DRWSubdivCache & cache)
inline

◆ test_draw_manager_sync()

◆ test_draw_pass_all_commands()

◆ test_draw_pass_multi_draw()

◆ test_draw_pass_simple_draw()

◆ test_draw_pass_sortable()

static void blender::draw::test_draw_pass_sortable ( )
static

◆ test_draw_pass_sub_ordering()

◆ test_draw_resource_id_gen()

◆ test_draw_visibility()

◆ test_eevee_lut_gen()

◆ test_eevee_shadow_alloc()

static void blender::draw::test_eevee_shadow_alloc ( )
static

Definition at line 731 of file eevee_test.cc.

References SHADOW_MAX_PAGE.

◆ test_eevee_shadow_defrag()

static void blender::draw::test_eevee_shadow_defrag ( )
static

Definition at line 623 of file eevee_test.cc.

References SHADOW_MAX_PAGE.

◆ test_eevee_shadow_finalize()

static void blender::draw::test_eevee_shadow_finalize ( )
static

The layout of these expected strings is Y down.

The layout of these expected strings is Y down.

Definition at line 739 of file eevee_test.cc.

References blender::draw::StorageVectorBuffer< T, len >::append(), blender::draw::Texture::clear(), blender::draw::detail::StorageCommon< T, len, device_only >::clear_to_zero(), blender::eevee::ShadowTileMapData::clip_data_index, blender::eevee::ShadowTileMapData::clip_far, blender::eevee::ShadowTileMapClip::clip_far_stored, blender::eevee::ShadowTileMapData::clip_near, data, DRW_shaders_free(), blender::draw::Texture::ensure_2d(), EXPECT_EQ(), GPU_BARRIER_BUFFER_UPDATE, GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_TEXTURE_UPDATE, GPU_DATA_UINT, GPU_R32UI, GPU_render_begin(), GPU_render_end(), GPU_shader_create_from_info_name(), GPU_shader_free(), GPU_TEXTURE_USAGE_HOST_READ, GPU_TEXTURE_USAGE_SHADER_READ, GPU_TEXTURE_USAGE_SHADER_WRITE, blender::eevee::ShadowTileMapData::half_size, blender::MatBase< float, 4, 4 >::identity(), MEM_SAFE_FREE, blender::eevee::ShadowPagesInfoData::page_alloc_count, blender::eevee::ShadowPagesInfoData::page_cached_end, blender::eevee::ShadowPagesInfoData::page_cached_next, blender::eevee::ShadowPagesInfoData::page_cached_start, blender::eevee::ShadowPagesInfoData::page_free_count, blender::math::projection::perspective(), blender::eevee::ShadowTileMapData::projection_type, blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::draw::Texture::read(), result, blender::eevee::SHADOW_NO_DATA, SHADOW_PAGE_PER_ROW, blender::eevee::SHADOW_PROJECTION_CUBEFACE, blender::eevee::shadow_tile_pack(), blender::eevee::shadow_tile_unpack(), SHADOW_TILEDATA_PER_TILEMAP, SHADOW_TILEMAP_LOD0_LEN, SHADOW_TILEMAP_LOD1_LEN, SHADOW_TILEMAP_LOD2_LEN, SHADOW_TILEMAP_LOD3_LEN, SHADOW_TILEMAP_LOD4_LEN, SHADOW_TILEMAP_RES, SHADOW_VIEW_MAX, blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::Manager::submit(), tile, blender::eevee::ShadowTileMapData::tiles_index, blender::eevee::ShadowStatistics::view_needed_count, blender::eevee::ShadowTileMapData::viewmat, KernelWorkTile::x, and KernelWorkTile::y.

◆ test_eevee_shadow_free()

◆ test_eevee_shadow_page_mask()

static void blender::draw::test_eevee_shadow_page_mask ( )
static

Definition at line 1790 of file eevee_test.cc.

References test_eevee_shadow_page_mask_ex().

◆ test_eevee_shadow_page_mask_ex()

◆ test_eevee_shadow_shift()

◆ test_eevee_shadow_shift_clear()

◆ test_eevee_shadow_tag_update()

static void blender::draw::test_eevee_shadow_tag_update ( )
static

◆ test_eevee_shadow_tile_packing()

◆ test_eevee_shadow_tilemap_amend()

◆ test_eevee_surfel_list()

◆ texpaint_request_active_uv()

◆ thickness_remap()

BLI_INLINE float blender::draw::thickness_remap ( float fac,
float min,
float max,
float minmax_irange )

Definition at line 109 of file extract_mesh_vbo_mesh_analysis.cc.

References CLAMP, and min.

Referenced by statvis_calc_thickness().

◆ to_blend()

◆ to_depth_test()

◆ to_face_cull_test()

static eGPUFaceCullTest blender::draw::to_face_cull_test ( DRWState state)
inlinestatic

◆ to_provoking_vertex()

static eGPUProvokingVertex blender::draw::to_provoking_vertex ( DRWState state)
inlinestatic

◆ to_stencil_op()

◆ to_stencil_test()

◆ to_write_mask()

◆ tris_count_from_number_of_loops()

static uint blender::draw::tris_count_from_number_of_loops ( const uint number_of_loops)
static

◆ uv_from_jitter_v2()

static void blender::draw::uv_from_jitter_v2 ( float uv[2])
static

Needed so we can use jitter values for face interpolation.

Definition at line 97 of file extract_mesh_vbo_mesh_analysis.cc.

References clamp_v2().

Referenced by statvis_calc_thickness().

◆ v2_to_short_angle()

static short blender::draw::v2_to_short_angle ( const float v[2])
static

Definition at line 59 of file extract_mesh_vbo_edituv_stretch_angle.cc.

References atan2f, float, M_1_PI, and v.

Referenced by edituv_get_edituv_stretch_angle().

◆ vert_len_calc()

static int blender::draw::vert_len_calc ( int u,
int v,
int w )
static

Definition at line 37 of file draw_cache_impl_lattice.cc.

References v, and w().

Referenced by lattice_render_verts_len_get().

◆ vertbuf_alloc()

static void * blender::draw::vertbuf_alloc ( const OpenSubdiv_Buffer * interface,
const uint len )
static

◆ vertbuf_bind_gpu()

static void blender::draw::vertbuf_bind_gpu ( const OpenSubdiv_Buffer * buffer)
static

◆ vertbuf_data_extract_direct()

void blender::draw::vertbuf_data_extract_direct ( const GSpan attribute,
gpu::VertBuf & vbo )

◆ vertbuf_device_alloc()

static void blender::draw::vertbuf_device_alloc ( const OpenSubdiv_Buffer * interface,
const uint len )
static

◆ vertbuf_update_data()

static void blender::draw::vertbuf_update_data ( const OpenSubdiv_Buffer * interface,
uint start,
uint len,
const void * data )
static

◆ vertbuf_wrap_device_handle()

static void blender::draw::vertbuf_wrap_device_handle ( const OpenSubdiv_Buffer * interface,
uint64_t handle )
static

◆ volume_batch_cache_clear()

◆ volume_batch_cache_get()

◆ volume_batch_cache_init()

static void blender::draw::volume_batch_cache_init ( Volume * volume)
static

◆ volume_batch_cache_valid()

static bool blender::draw::volume_batch_cache_valid ( Volume * volume)
static

◆ volume_grid_cache_get()

◆ volume_object_grids_init()

◆ volume_sub_pass()

PassMain::Sub * blender::draw::volume_sub_pass ( PassMain::Sub & ps,
Scene * scene,
Object * ob,
GPUMaterial * gpu_material )

Volume. Add attribute bindings of volume grids to an existing pass. No draw call is added so the caller can decide how to use the data.

Returns
nullptr if there is nothing to draw.

Add attribute bindings of volume grids to an existing pass. No draw call is added so the caller can decide how to use the data.

Returns
nullptr if there is nothing to draw.

Definition at line 448 of file draw_volume.cc.

References volume_sub_pass_implementation().

Referenced by blender::eevee::WorldVolumePipeline::sync(), blender::eevee::SyncModule::sync_volume(), and blender::eevee::volume_call().

◆ volume_sub_pass_implementation()

template<typename PassType >
PassType * blender::draw::volume_sub_pass_implementation ( PassType & ps,
Scene * scene,
Object * ob,
GPUMaterial * gpu_material )

◆ volume_world_grids_init()

template<typename PassType >
PassType * blender::draw::volume_world_grids_init ( PassType & ps,
ListBaseWrapper< GPUMaterialAttribute > & attrs )

Definition at line 284 of file draw_volume.cc.

References grid_default_texture().

Referenced by volume_sub_pass_implementation().

Variable Documentation

◆ DUMMY_ID

uint blender::draw::DUMMY_ID
static

Definition at line 103 of file draw_cache_impl_curves.cc.

◆ g_dummy_vbo [1/2]

◆ g_dummy_vbo [2/2]

gpu::VertBuf* blender::draw::g_dummy_vbo = nullptr
static

Definition at line 36 of file draw_pointcloud.cc.

◆ g_evaluator_cache

OpenSubdiv_EvaluatorCache* blender::draw::g_evaluator_cache = nullptr
static

Definition at line 2254 of file draw_cache_impl_subdivision.cc.

Referenced by DRW_create_subdivision(), and DRW_subdiv_free().

◆ g_pass [1/2]

PassSimple* blender::draw::g_pass = nullptr
static

◆ g_pass [2/2]

PassSimple* blender::draw::g_pass = nullptr
static

Definition at line 270 of file draw_hair.cc.

◆ g_subdiv_custom_data_shaders

GPUShader* blender::draw::g_subdiv_custom_data_shaders[SHADER_CUSTOM_DATA_INTERP_MAX_DIMENSIONS][GPU_COMP_MAX]
static

Definition at line 97 of file draw_cache_impl_subdivision.cc.

Referenced by get_subdiv_custom_data_shader().

◆ g_subdiv_shaders

GPUShader* blender::draw::g_subdiv_shaders[NUM_SHADERS]
static

◆ g_tf_pass

DRWPass* blender::draw::g_tf_pass
static

◆ gpu_subdiv_free_queue

LinkNode* blender::draw::gpu_subdiv_free_queue = nullptr
static

◆ gpu_subdiv_queue_mutex

ThreadMutex blender::draw::gpu_subdiv_queue_mutex = BLI_MUTEX_INITIALIZER
static

◆ half_octahedron_tris

const uint blender::draw::half_octahedron_tris[4][3]
static
Initial value:
= {
{0, 1, 2},
{0, 2, 3},
{0, 3, 4},
{0, 4, 1},
}

Definition at line 221 of file draw_cache_impl_pointcloud.cc.

Referenced by pointcloud_extract_indices().