Blender V5.0
blender::draw Namespace Reference

Namespaces

namespace  pbvh
namespace  compositor_engine
namespace  external
namespace  gpencil
namespace  overlay
namespace  edit_select_debug
namespace  edit_select
namespace  select
namespace  color_management
namespace  command
namespace  detail
namespace  Shader

Classes

struct  AttributeConverter
struct  AttributeConverter< bool >
struct  AttributeConverter< int8_t >
struct  AttributeConverter< int >
struct  AttributeConverter< int2 >
struct  AttributeConverter< float >
struct  AttributeConverter< float2 >
struct  AttributeConverter< float3 >
struct  AttributeConverter< ColorGeometry4b >
struct  AttributeConverter< ColorGeometry4f >
struct  AttributeConverter< math::Quaternion >
struct  DRW_MeshCDMask
struct  DRWVolumeGrid
struct  DRW_MeshWeightState
struct  MeshBufferList
struct  MeshBatchList
struct  MeshExtractLooseGeom
struct  SortedFaceData
struct  MeshBufferCache
struct  MeshBatchCache
struct  CurveRenderData
struct  CurveBatchCache
struct  CurvesBatchCache
struct  GreasePencilBatchCache
struct  GreasePencilStrokeVert
struct  GreasePencilColorVert
struct  LatticeRenderData
struct  LatticeBatchCache
struct  ParticleHairFinalCache
struct  ParticleHairCache
struct  ParticlePointCache
struct  ParticleBatchCache
struct  HairAttributeID
struct  EditStrandData
struct  PointCloudEvalCache
struct  PointCloudBatchCache
struct  VolumeBatchCache
struct  VolumeWireframeUserData
struct  InstancesKey
struct  ParticleSpans
struct  ParticleDrawSource
struct  CurvesEvalCache
class  DebugDraw
class  CurveRefinePass
struct  CurvesUniformBufPool
struct  CurvesModule
struct  ResourceIndex
struct  ResourceIndexRange
class  ResourceHandle
class  ResourceHandleRange
class  ObjectRef
class  ObjectKey
class  Manager
class  PassSortable
struct  PointCloudModule
struct  SculptBatch
struct  DRWPatchMap
struct  DRWSubdivCache
class  View
struct  VolumeUniformBufPool
struct  VolumeModule
class  UniformArrayBuffer
class  UniformBuffer
class  StorageArrayBuffer
class  StorageVectorBuffer
class  StorageBuffer
class  Texture
class  TextureFromPool
class  TextureRef
class  Image
class  Framebuffer
class  SwapChain
struct  MeshRenderData
struct  EditLoopData
struct  MEdgeDataPrev
struct  UVStretchAngle
struct  MeshExtract_StretchAngle_Data
struct  AreaInfo
struct  BVHTree_OverlapData
struct  SkinRootData
class  TestDefrag
class  TestAlloc

Typedefs

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

Enumerations

enum  eDRWLevelOfDetail { DRW_LOD_LOW = 0 , DRW_LOD_MEDIUM = 1 , DRW_LOD_HIGH = 2 , DRW_LOD_MAX }
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 class  VBOType : int8_t {
  Position , CornerNormal , EdgeFactor , VertexGroupWeight ,
  UVs , Tangents , SculptData , Orco ,
  EditData , EditUVData , EditUVStretchArea , EditUVStretchAngle ,
  MeshAnalysis , FaceDotPosition , FaceDotNormal , FaceDotUV ,
  FaceDotEditUVData , SkinRoots , IndexVert , IndexEdge ,
  IndexFace , IndexFaceDot , Attr0 , Attr1 ,
  Attr2 , Attr3 , Attr5 , Attr6 ,
  Attr7 , Attr8 , Attr9 , Attr10 ,
  Attr11 , Attr12 , Attr13 , Attr14 ,
  Attr15 , AttrViewer , VertexNormal , PaintOverlayFlag
}
enum class  IBOType : int8_t {
  Tris , Lines , LinesLoose , Points ,
  FaceDots , LinesPaintMask , LinesAdjacency , UVTris ,
  AllUVLines , UVLines , EditUVTris , EditUVLines ,
  EditUVPoints , EditUVFaceDots
}
enum  DRWBatchFlag : uint64_t {
  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_UV_FACES = (1u << MBC_BATCH_INDEX(uv_faces)) , 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_PAINT_OVERLAY_WIRE_LOOPS = (1u << MBC_BATCH_INDEX(paint_overlay_wire_loops)) , MBC_WIRE_LOOPS_ALL_UVS = (1u << MBC_BATCH_INDEX(wire_loops_all_uvs)) ,
  MBC_WIRE_LOOPS_UVS = (1u << MBC_BATCH_INDEX(wire_loops_uvs)) , MBC_WIRE_LOOPS_EDITUVS = (1u << MBC_BATCH_INDEX(wire_loops_edituvs)) , MBC_SCULPT_OVERLAYS = (1u << MBC_BATCH_INDEX(sculpt_overlays)) , MBC_VIEWER_ATTRIBUTE_OVERLAY = (1u << MBC_BATCH_INDEX(surface_viewer_attribute)) ,
  MBC_PAINT_OVERLAY_VERTS = (uint64_t(1u) << MBC_BATCH_INDEX(paint_overlay_verts)) , MBC_PAINT_OVERLAY_SURFACE = (uint64_t(1u) << MBC_BATCH_INDEX(paint_overlay_surface)) , MBC_SURFACE_PER_MAT = (uint64_t(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 class  InstancesFlags : uint8_t { IsNegativeScale = 1 << 0 }
enum  CurvesEvalShader {
  CURVES_EVAL_POSITION = 0 , CURVES_EVAL_FLOAT = 1 , CURVES_EVAL_FLOAT2 = 2 , CURVES_EVAL_FLOAT3 = 3 ,
  CURVES_EVAL_FLOAT4 = 4 , CURVES_EVAL_LENGTH_INTERCEPT = 5
}
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
}
enum class  UvExtractionMode : int8_t { Edit , Selection , All }
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
}

Functions

void DRW_cache_free_old_subdiv ()
void DRW_cdlayer_attr_aliases_add (GPUVertFormat *format, const char *base_name, bke::AttrType data_type, blender::StringRef layer_name, bool is_active_render, bool is_active_layer)
GPUVertFormat init_format_for_attribute (const bke::AttrType data_type, const StringRef vbo_name)
void vertbuf_data_extract_direct (const GSpan attribute, gpu::VertBuf &vbo)
void drw_attributes_merge (VectorSet< std::string > *dst, const VectorSet< std::string > *src)
bool drw_attributes_overlap (const VectorSet< std::string > *a, const VectorSet< std::string > *b)
void drw_attributes_add_request (VectorSet< std::string > *attrs, const StringRef name)
bool drw_custom_data_match_attribute (const CustomData &custom_data, const StringRef name, int *r_layer_index, eCustomDataType *r_type)
Span< gpu::Batch * > DRW_cache_object_surface_material_get (Object *ob, Span< const GPUMaterial * > materials)
Span< gpu::Batch * > DRW_cache_mesh_surface_shaded_get (Object *ob, Span< const GPUMaterial * > materials)
DRWVolumeGridDRW_volume_batch_cache_get_grid (Volume *volume, const bke::VolumeGridData *volume_grid)
gpu::Batch * DRW_cache_grease_pencil_get (const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_edit_points_get (const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_edit_lines_get (const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_edit_handles_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)
gpu::Batch * DRW_cache_grease_pencil_weight_points_get (const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_weight_lines_get (const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_face_wireframe_get (const Scene *scene, Object *ob)
 ENUM_OPERATORS (DRWBatchFlag, MBC_SURFACE_PER_MAT)
 BLI_STATIC_ASSERT (MBC_BATCH_LEN< 64, "Number of batches exceeded the limit of bit fields")
static void ensure_dependency_data (MeshRenderData &mr, Span< IBOType > ibo_requests, Span< VBOType > vbo_requests, MeshBufferCache &cache)
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 bool batch_cache_is_dirty (const Curves &curves)
static void init_batch_cache (Curves &curves)
static void clear_edit_data (CurvesBatchCache *cache)
static void clear_batch_cache (Curves &curves)
static CurvesBatchCacheget_batch_cache (Curves &curves)
static uint32_t bezier_data_value (int8_t handle_type, bool is_active)
static int handles_and_points_num (const int points_num, const OffsetIndices< int > bezier_offsets)
static IndexRange handle_range_left (const int points_num, const OffsetIndices< int > bezier_offsets)
static IndexRange handle_range_right (const int points_num, const OffsetIndices< int > bezier_offsets)
static void extract_edit_data (const OffsetIndices< int > points_by_curve, const IndexMask &curve_selection, const VArray< bool > &selection_attr, const bool mark_active, const uint32_t fill_value, MutableSpan< uint32_t > data)
static void create_edit_points_data (const OffsetIndices< int > points_by_curve, const IndexMask &catmull_rom_curves, const IndexMask &poly_curves, const IndexMask &bezier_curves, const IndexMask &nurbs_curves, const OffsetIndices< int > bezier_offsets, const bke::CurvesGeometry &curves, gpu::VertBuf &vbo)
static void create_edit_points_position (const bke::CurvesGeometry &curves, const OffsetIndices< int > points_by_curve, const IndexMask &bezier_curves, const OffsetIndices< int > bezier_offsets, const bke::crazyspace::GeometryDeformation deformation, gpu::VertBuf &vbo)
static void create_edit_points_selection (const OffsetIndices< int > points_by_curve, const IndexMask &bezier_curves, const OffsetIndices< int > bezier_offsets, const bke::AttributeAccessor attributes, gpu::VertBuf &vbo)
static void create_lines_ibo_no_cyclic (const OffsetIndices< int > points_by_curve, gpu::IndexBuf &ibo)
static void create_lines_ibo_with_cyclic (const OffsetIndices< int > points_by_curve, const Span< bool > cyclic, gpu::IndexBuf &ibo)
static void create_lines_ibo_with_cyclic (const OffsetIndices< int > points_by_curve, const VArray< bool > &cyclic, gpu::IndexBuf &ibo)
static void create_segments_with_cyclic (const OffsetIndices< int > points_by_curve, const VArray< bool > &cyclic, const IndexMask &selection, MutableSpan< uint2 > lines)
static void calc_edit_handles_ibo (const OffsetIndices< int > points_by_curve, const IndexMask &catmull_rom_curves, const IndexMask &poly_curves, const IndexMask &bezier_curves, const IndexMask &nurbs_curves, const OffsetIndices< int > bezier_offsets, const VArray< bool > &cyclic, gpu::IndexBuf &ibo)
static gpu::VertBufPtr alloc_evaluated_point_attribute_vbo (const GPUVertFormat &format, const StringRef, int64_t size)
static gpu::VertBufPtr ensure_control_point_attribute (const bke::CurvesGeometry &curves, const StringRef name, const GPUVertFormat &format, bool &r_is_point_domain)
static std::optional< StringRefget_first_uv_name (const bke::AttributeAccessor &attributes)
static void request_attribute (Curves &curves, const StringRef name)
void drw_curves_get_attribute_sampler_name (const StringRef layer_name, char r_sampler_name[32])
CurvesEvalCachecurves_get_eval_cache (Curves &curves_id)
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 const 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 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 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)
void drw_particle_update_ptcache (Object *object_eval, ParticleSystem *psys)
ParticleDrawSource drw_particle_get_hair_source (Object *object, ParticleSystem *psys, ModifierData *md, PTCacheEdit *edit, const int additional_subdivision)
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)
static int particle_mface_index (const ParticleData &particle, int face_count_legacy)
static int particle_mface_index (const ChildParticle &particle, int)
static float4 particle_mcol_convert (const MCol &mcol)
template<typename ParticleDataT>
static float4 interpolate (const ParticleDataT &particle, Span< MFace > mfaces, Span< MCol > mcols)
template<typename ParticleDataT>
static float2 interpolate (const ParticleDataT &particle, Span< MFace > mfaces, Span< MTFace > mtfaces)
static std::optional< StringRefget_first_uv_name (const bke::AttributeAccessor &attributes)
template<typename T>
Span< Tspan_from_custom_data_layer (const Mesh &mesh, const eCustomDataType type, const StringRef name)
template<typename T>
Span< Tspan_from_custom_data_layer (const Mesh &mesh, const eCustomDataType type)
template<typename InputT, typename OutputT, eCustomDataType data_type>
static gpu::VertBufPtr interpolate_face_corner_attribute_to_curve (ParticleDrawSource &src, const StringRef name)
static gpu::VertBufPtr ensure_curve_attribute (ParticleDrawSource &src, const Mesh &mesh, const StringRef name, bool &r_is_point_domain)
static float hair_shape_radius (float shape, float root, float tip, float time)
CurvesEvalCachehair_particle_get_eval_cache (ParticleDrawSource &src)
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, gpu::Shader *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 (const DRWSubdivCache &cache, gpu::VertBuf *pos, 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, GPUVertCompType comp_type, int dimensions, int dst_offset)
void draw_subdiv_interp_corner_normals (const DRWSubdivCache &cache, gpu::VertBuf &src_data, gpu::VertBuf &dst_data)
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, gpu::VertBuf *face_adjacency_offsets, gpu::VertBuf *face_adjacency_lists, gpu::VertBuf *vertex_loop_map, gpu::VertBuf *vert_normals)
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, 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, gpu::VertBuf *vert_normals, gpu::VertBuf *subdiv_corner_verts, gpu::VertBuf *lnor)
void draw_subdiv_build_paint_overlay_flag_buffer (const DRWSubdivCache &cache, gpu::VertBuf &flags)
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, 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 Span< IBOType > ibo_requests, const Span< VBOType > vbo_requests, const bool is_editmode, const bool is_paint_mode, const bool do_final, const bool do_uvedit, const bool do_cage, const ToolSettings *ts, const bool use_hide)
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 Span< IBOType > ibo_requests, const Span< VBOType > vbo_requests, const bool is_editmode, const bool is_paint_mode, 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)
gpu::Batch * hair_sub_pass_setup (PassMain::Sub &sub_ps, const Scene *scene, const ObjectRef &ob_ref, ParticleSystem *psys, ModifierData *md, GPUMaterial *gpu_material=nullptr)
gpu::VertBufcurves_pos_buffer_get (Object *object)
gpu::Batch * curves_sub_pass_setup (PassMain::Sub &ps, const Scene *scene, Object *ob, const char *&r_error, GPUMaterial *gpu_material=nullptr)
gpu::Batch * pointcloud_sub_pass_setup (PassMain::Sub &sub_ps, Object *object, GPUMaterial *gpu_material=nullptr)
void DRW_curves_init (DRWData *drw_data=nullptr)
void DRW_curves_begin_sync (DRWData *drw_data)
void DRW_curves_module_free (draw::CurvesModule *module)
void DRW_curves_update (draw::Manager &manager)
void DRW_pointcloud_init (DRWData *drw_data=nullptr)
void DRW_pointcloud_module_free (draw::PointCloudModule *module)
void DRW_volume_init (DRWData *drw_data=nullptr)
void DRW_volume_module_free (draw::VolumeModule *module)
static bool supports_handle_ranges (DupliObject *dupli, Object *parent)
 ENUM_OPERATORS (InstancesFlags, InstancesFlags::IsNegativeScale)
static void foreach_obref_in_scene (DRWContext &draw_ctx, FunctionRef< bool(Object &)> should_draw_object_cb, FunctionRef< void(ObjectRef &)> draw_object_cb)
void DRW_mesh_get_attributes (const Object &object, const Mesh &mesh, Span< const GPUMaterial * > materials, VectorSet< std::string > *r_attrs, DRW_MeshCDMask *r_cd_needed)
static int attribute_index_in_material (const GPUMaterial *gpu_material, const StringRef name, bool is_curve_length=false, bool is_curve_intercept=false)
static std::optional< StringRefget_first_uv_name (const bke::AttributeAccessor &attributes)
static bool set_attribute_type (const GPUMaterial *gpu_material, const StringRef name, CurvesInfosBuf &curves_infos, const bool is_point_domain)
template<typename PassT>
void curves_bind_resources_implementation (PassT &sub_ps, CurvesModule &module, CurvesEvalCache &cache, const int face_per_segment, GPUMaterial *gpu_material, gpu::VertBufPtr &indirection_buf, const std::optional< StringRef > uv_name)
void curves_bind_resources (PassMain::Sub &sub_ps, CurvesModule &module, CurvesEvalCache &cache, const int face_per_segment, GPUMaterial *gpu_material, gpu::VertBufPtr &indirection_buf, const std::optional< StringRef > active_uv_name)
template<typename PassT>
gpu::Batch * curves_sub_pass_setup_implementation (PassT &sub_ps, const Scene *scene, Object *ob, const char *&r_error, GPUMaterial *gpu_material=nullptr)
template<typename PassT>
blender::gpu::Batch * hair_sub_pass_setup_implementation (PassT &sub_ps, const Scene *scene, const ObjectRef &ob_ref, ParticleSystem *psys, ModifierData *md, GPUMaterial *gpu_material)
template<typename PassT>
gpu::Batch * pointcloud_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)
static const CustomDataget_cdata (const BMesh &bm, const bke::AttrDomain domain)
static bool bmesh_attribute_exists (const BMesh &bm, const bke::AttributeMetaData &meta_data, const StringRef name)
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)
uint2 edge_from_corners (const IndexRange face, const int corner)
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)
gpu::VertBufPtr extract_positions (const MeshRenderData &mr)
gpu::VertBufPtr extract_positions_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBufPtr *orco_vbo)
gpu::VertBufPtr extract_face_dots_position (const MeshRenderData &mr)
void extract_face_dots_subdiv (const DRWSubdivCache &subdiv_cache, gpu::VertBufPtr &fdots_pos, gpu::VertBufPtr *fdots_nor, gpu::IndexBufPtr &fdots)
gpu::VertBufPtr extract_normals (const MeshRenderData &mr, bool use_hq)
gpu::VertBufPtr extract_normals_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &pos)
gpu::VertBufPtr extract_vert_normals (const MeshRenderData &mr)
gpu::VertBufPtr extract_face_dot_normals (const MeshRenderData &mr, bool use_hq)
gpu::VertBufPtr extract_edge_factor (const MeshRenderData &mr)
gpu::VertBufPtr extract_edge_factor_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &pos)
gpu::IndexBufPtr extract_tris (const MeshRenderData &mr, const SortedFaceData &face_sorted)
void create_material_subranges (const SortedFaceData &face_sorted, gpu::IndexBuf &tris_ibo, MutableSpan< gpu::IndexBufPtr > ibos)
gpu::IndexBufPtr extract_tris_subdiv (const DRWSubdivCache &subdiv_cache, MeshBatchCache &cache)
void extract_lines (const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
void extract_lines_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
gpu::IndexBufPtr extract_points (const MeshRenderData &mr)
gpu::IndexBufPtr extract_points_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_edit_data (const MeshRenderData &mr)
gpu::VertBufPtr extract_edit_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_tangents (const MeshRenderData &mr, const MeshBatchCache &cache, bool use_hq)
gpu::VertBufPtr extract_tangents_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr extract_vert_index (const MeshRenderData &mr)
gpu::VertBufPtr extract_edge_index (const MeshRenderData &mr)
gpu::VertBufPtr extract_face_index (const MeshRenderData &mr)
gpu::VertBufPtr extract_face_dot_index (const MeshRenderData &mr)
gpu::VertBufPtr extract_vert_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr extract_edge_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr extract_face_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr extract_weights (const MeshRenderData &mr, const MeshBatchCache &cache)
gpu::VertBufPtr extract_weights_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::IndexBufPtr extract_face_dots (const MeshRenderData &mr)
gpu::VertBufPtr extract_face_dots_uv (const MeshRenderData &mr)
gpu::VertBufPtr extract_face_dots_edituv_data (const MeshRenderData &mr)
gpu::IndexBufPtr extract_lines_paint_mask (const MeshRenderData &mr)
gpu::IndexBufPtr extract_lines_paint_mask_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::IndexBufPtr extract_lines_adjacency (const MeshRenderData &mr, bool &r_is_manifold)
gpu::IndexBufPtr extract_lines_adjacency_subdiv (const DRWSubdivCache &subdiv_cache, bool &r_is_manifold)
gpu::VertBufPtr extract_uv_maps (const MeshRenderData &mr, const MeshBatchCache &cache)
gpu::VertBufPtr extract_uv_maps_subdiv (const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr extract_edituv_stretch_area (const MeshRenderData &mr, float &tot_area, float &tot_uv_area)
gpu::VertBufPtr extract_edituv_stretch_area_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, float &tot_area, float &tot_uv_area)
gpu::VertBufPtr extract_edituv_stretch_angle (const MeshRenderData &mr)
gpu::VertBufPtr extract_edituv_stretch_angle_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr extract_mesh_analysis (const MeshRenderData &mr, const float4x4 &object_to_world)
gpu::VertBufPtr extract_skin_roots (const MeshRenderData &mr)
gpu::VertBufPtr extract_sculpt_data (const MeshRenderData &mr)
gpu::VertBufPtr extract_sculpt_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_orco (const MeshRenderData &mr)
gpu::VertBufPtr extract_paint_overlay_flags (const MeshRenderData &mr)
gpu::VertBufPtr extract_paint_overlay_flags_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
static IndexMask calc_face_visibility_mesh (const MeshRenderData &mr, IndexMaskMemory &memory)
static gpu::IndexBufPtr index_mask_to_ibo (const IndexMask &mask)
static gpu::IndexBufPtr extract_face_dots_mesh (const MeshRenderData &mr)
static gpu::IndexBufPtr extract_face_dots_bm (const MeshRenderData &mr)
static IndexMask calc_mesh_edge_visibility (const MeshRenderData &mr, const IndexMask &mask, IndexMaskMemory &memory)
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::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
static void extract_lines_bm (const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *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 gpu::IndexBufPtr extract_points_mesh (const MeshRenderData &mr)
template<typename Fn>
static void process_ibo_verts_bm (const MeshRenderData &mr, const Fn &process_vert_fn)
static gpu::IndexBufPtr extract_points_bm (const MeshRenderData &mr)
static IndexMask calc_vert_visibility_mapped_mesh (const MeshRenderData &mr, const IndexMask &mask, const Span< int > map, IndexMaskMemory &memory)
static gpu::IndexBufPtr extract_points_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
static gpu::IndexBufPtr extract_points_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
static gpu::IndexBufPtr extract_tris_mesh (const MeshRenderData &mr, const SortedFaceData &face_sorted)
static gpu::IndexBufPtr extract_tris_bmesh (const MeshRenderData &mr, const SortedFaceData &face_sorted)
float edge_factor_calc (const float3 &a, const float3 &b)
static void extract_edge_factor_mesh (const MeshRenderData &mr, MutableSpan< float > vbo_data)
static void extract_edge_factor_bm (const MeshRenderData &mr, MutableSpan< float > vbo_data)
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 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_vert_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > normals)
template<typename GPUType>
static void extract_face_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > normals)
template<typename GPUType>
static void extract_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > normals)
static const GPUVertFormatget_normals_format ()
static void update_loose_normals (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &lnor)
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, const float4x4 &object_to_world, 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, const float4x4 &object_to_world, 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_paint_overlay_flags (const MeshRenderData &mr, MutableSpan< int > flags)
static void extract_edit_flags_bm (const MeshRenderData &mr, MutableSpan< int > flags)
static const GPUVertFormatget_paint_overlay_flag_format ()
static void update_loose_flags (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &flags)
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 void extract_loose_positions_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
static const GPUVertFormatget_sculpt_data_format ()
static gpu::VertBufPtr create_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, MutableSpan< int32_t > vbo_data)
static void extract_edge_idx_loose_geom_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, MutableSpan< int32_t > vbo_data)
static Array< Array< float4 > > extract_tan_init_common (const MeshRenderData &mr, const MeshBatchCache &cache, GPUVertFormat *format, gpu::VertAttrType gpu_attr_type)
static const GPUVertFormatget_coarse_tan_format ()
static bool mesh_extract_uv_format_init (GPUVertFormat *format, const MeshBatchCache &cache, const CustomData *cd_ldata, const MeshExtractType extract_type, uint32_t &r_uv_layers)
static void extract_vert_normals_mesh (const MeshRenderData &mr, MutableSpan< gpu::PackedNormal > vbo_data)
static void extract_vert_normals_bm (const MeshRenderData &mr, MutableSpan< gpu::PackedNormal > 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_curves_lib ()
static void test_draw_curves_topology ()
static void test_draw_curves_interpolate_position ()
static void test_draw_curves_interpolate_attributes ()
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_draw_submit_only ()
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 (gpu::VertBuf *vbo, const int vert_len)
Common Object API
Note
Curve and text objects evaluate to the evaluated geometry set's mesh component if they have a surface, so curve objects themselves do not have a surface (the mesh component is presented to render engines as a separate object).
gpu::Batch * DRW_cache_object_all_edges_get (Object *ob)
gpu::Batch * DRW_cache_object_edge_detection_get (Object *ob, bool *r_is_manifold)
gpu::Batch * DRW_cache_object_face_wireframe_get (const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_object_loose_edges_get (Object *ob)
gpu::Batch * DRW_cache_object_surface_get (Object *ob)
Span< gpu::Batch * > DRW_cache_object_surface_material_get (Object *ob, const Span< const GPUMaterial * > materials)
Meshes
gpu::Batch * DRW_cache_mesh_all_verts_get (Object *ob)
gpu::Batch * DRW_cache_mesh_paint_overlay_verts_get (Object *ob)
gpu::Batch * DRW_cache_mesh_all_edges_get (Object *ob)
gpu::Batch * DRW_cache_mesh_loose_edges_get (Object *ob)
gpu::Batch * DRW_cache_mesh_edge_detection_get (Object *ob, bool *r_is_manifold)
gpu::Batch * DRW_cache_mesh_surface_get (Object *ob)
gpu::Batch * DRW_cache_mesh_paint_overlay_surface_get (Object *ob)
gpu::Batch * DRW_cache_mesh_paint_overlay_edges_get (Object *ob)
Span< gpu::Batch * > DRW_cache_mesh_surface_shaded_get (Object *ob, const Span< const GPUMaterial * > materials)
Span< gpu::Batch * > DRW_cache_mesh_surface_texpaint_get (Object *ob)
gpu::Batch * DRW_cache_mesh_surface_texpaint_single_get (Object *ob)
gpu::Batch * DRW_cache_mesh_surface_vertpaint_get (Object *ob)
gpu::Batch * DRW_cache_mesh_surface_sculptcolors_get (Object *ob)
gpu::Batch * DRW_cache_mesh_surface_weights_get (Object *ob)
gpu::Batch * DRW_cache_mesh_face_wireframe_get (Object *ob)
gpu::Batch * DRW_cache_mesh_surface_mesh_analysis_get (Object *ob)
gpu::Batch * DRW_cache_mesh_surface_viewer_attribute_get (Object *ob)
Curve
gpu::Batch * DRW_cache_curve_edge_wire_get (Object *ob)
gpu::Batch * DRW_cache_curve_edge_wire_viewer_attribute_get (Object *ob)
gpu::Batch * DRW_cache_curve_edge_normal_get (Object *ob)
gpu::Batch * DRW_cache_curve_edge_overlay_get (Object *ob)
gpu::Batch * DRW_cache_curve_vert_overlay_get (Object *ob)
void DRW_curve_batch_cache_create_requested (Object *ob, const Scene *scene)
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)
Font
gpu::Batch * DRW_cache_text_edge_wire_get (Object *ob)
Surface
gpu::Batch * DRW_cache_surf_edge_wire_get (Object *ob)
Lattice
gpu::Batch * DRW_cache_lattice_verts_get (Object *ob)
gpu::Batch * DRW_cache_lattice_wire_get (Object *ob, bool use_weight)
gpu::Batch * DRW_cache_lattice_vert_overlay_get (Object *ob)
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)
PointCloud
gpu::Batch * DRW_cache_pointcloud_vert_overlay_get (Object *ob)
gpu::VertBufDRW_pointcloud_position_and_radius_buffer_get (Object *ob)
gpu::VertBuf ** DRW_pointcloud_evaluated_attribute (PointCloud *pointcloud, StringRef name)
blender::gpu::Batch * DRW_pointcloud_batch_cache_get_dots (Object *ob)
blender::gpu::Batch * DRW_pointcloud_batch_cache_get_edit_dots (PointCloud *pointcloud)
void DRW_pointcloud_batch_cache_create_requested (Object *ob)
Volume
gpu::Batch * DRW_cache_volume_face_wireframe_get (Object *ob)
gpu::Batch * DRW_cache_volume_selection_surface_get (Object *ob)
blender::gpu::Batch * DRW_volume_batch_cache_get_wireframes_face (Volume *volume)
blender::gpu::Batch * DRW_volume_batch_cache_get_selection_surface (Volume *volume)
Particles
gpu::Batch * DRW_cache_particles_get_hair (Object *object, ParticleSystem *psys, ModifierData *md)
gpu::Batch * DRW_cache_particles_get_dots (Object *object, ParticleSystem *psys)
gpu::Batch * DRW_cache_particles_get_edit_strands (Object *object, ParticleSystem *psys, PTCacheEdit *edit, bool use_weight)
gpu::Batch * DRW_cache_particles_get_edit_inner_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
gpu::Batch * DRW_cache_particles_get_edit_tip_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
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)
Batch Cache Implementation (common)
void drw_batch_cache_validate (Object *ob)
void drw_batch_cache_generate_requested (Object *ob, TaskGraph &task_graph)
void drw_batch_cache_generate_requested_evaluated_mesh_or_curve (Object *ob, TaskGraph &task_graph)
void drw_batch_cache_generate_requested_delayed (Object *ob)
void DRW_batch_cache_free_old (Object *ob, int ctime)
Extract Loop
void mesh_buffer_cache_create_requested (TaskGraph &task_graph, const Scene &scene, MeshBatchCache &cache, MeshBufferCache &mbc, Span< IBOType > ibo_requests, Span< VBOType > vbo_requests, Object &object, Mesh &mesh, bool is_editmode, bool is_paint_mode, bool do_final, bool do_uvedit, bool use_hide)
static bool use_normals_simplify (const Scene &scene, const MeshRenderData &mr)
Subdivision Extract Loop
void mesh_buffer_cache_create_requested_subdiv (MeshBatchCache &cache, MeshBufferCache &mbc, Span< IBOType > ibo_requests, Span< VBOType > vbo_requests, 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< int > mesh_render_data_mat_tri_len_build (const MeshRenderData &mr)
static Array< int > calc_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 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)
MeshRenderData mesh_render_data_create (Object &object, Mesh &mesh, const bool is_editmode, const bool is_paint_mode, 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 (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_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 *grease_pencil, int mode)
void DRW_grease_pencil_batch_cache_validate (GreasePencil *grease_pencil)
void DRW_grease_pencil_batch_cache_free (GreasePencil *grease_pencil)
Garbage Collection
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)
Curves
blender::gpu::VertBufPtrDRW_curves_texture_for_evaluated_attribute (Curves *curves, StringRef name, bool &r_is_point_domain, bool &r_valid_attribute)
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)
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_paint_overlay_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_paint_overlay_surface (Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_paint_overlay_edges (Mesh &mesh)
Span< gpu::Batch * > DRW_mesh_batch_cache_get_surface_shaded (Object &object, Mesh &mesh, Span< const GPUMaterial * > materials)
Span< 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_wireframe (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_faces (Object &object, Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_all_uv_wireframe (Object &object, Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_uv_wireframe (Object &object, Mesh &mesh)
blender::gpu::Batch * DRW_mesh_batch_cache_get_edit_mesh_analysis (Mesh &mesh)
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)
Vertex Formats

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

static const GPUVertFormatgrease_pencil_stroke_format ()
static const GPUVertFormatgrease_pencil_color_format ()
static const GPUVertFormatget_origindex_format ()
Internal Utilities
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 Buffers
BLI_INLINE int32_t pack_rotation_aspect_hardness_miter (const float rot, const float asp, const float softness, const float miter_angle)
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, const int layer_index, 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, const int layer_index, IndexMaskMemory &memory, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void index_buf_add_nurbs_lines (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void index_buf_add_bezier_handle_lines (const IndexMask bezier_points, const int all_points, MutableSpan< uint2 > handle_lines, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void index_buf_add_points (Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory, MutableSpan< uint > points_data, int *r_drawing_point_index, int *r_drawing_start_offset)
static uint32_t bezier_data_value (int8_t handle_type, bool is_active)
static void index_buf_add_bezier_line_points (const IndexMask bezier_points, MutableSpan< uint > points_data, int *r_drawing_point_index, 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 VArray< floatinterpolate_corners (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 void mesh_batch_cache_clear (MeshBatchCache &cache)
static void discard_buffers (MeshBatchCache &cache, const Span< VBOType > vbos, const Span< IBOType > ibos)
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 Span< const GPUMaterial * > materials, VectorSet< std::string > *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
static bool mesh_batch_cache_valid (Mesh &mesh)
static void mesh_batch_cache_init (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 (Mesh &mesh, 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_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, VectorSet< std::string > &attributes)
void DRW_mesh_get_attributes (const Object &object, const Mesh &mesh, const Span< const GPUMaterial * > materials, VectorSet< std::string > *r_attrs, DRW_MeshCDMask *r_cd_needed)
Span< gpu::Batch * > DRW_mesh_batch_cache_get_surface_shaded (Object &object, Mesh &mesh, const Span< const GPUMaterial * > materials)
UV Image editor API
static void edituv_request_active_uv (MeshBatchCache &cache, Object &object, Mesh &mesh)
Grouped batch generation
static void init_empty_dummy_batch (gpu::Batch &batch)
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)
API
static void index_mask_to_ibo (const IndexMask &mask, gpu::IndexBuf &ibo)
static void build_edit_selection_indices (const PointCloud &pointcloud, gpu::IndexBuf &ibo)
Utilities to build a gpu::VertBuf from an origindex buffer.
gpu::VertBufPtr draw_subdiv_init_origindex_buffer (int32_t *vert_origindex, uint num_loops, uint loose_len)
gpu::VertBufdraw_subdiv_build_origindex_buffer (int *vert_origindex, uint num_loops)
gpu::VertBufPtr draw_subdiv_init_origindex_buffer (Span< int32_t > vert_origindex, uint loose_len)
gpu::VertBufdraw_subdiv_build_origindex_buffer (Span< int > vert_origindex)
Utilities for DRWPatchMap.
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)
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, 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)
Public API for render engines.
PassMain::Subvolume_sub_pass (PassMain::Sub &ps, Scene *scene, Object *ob, GPUMaterial *gpu_material)
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)
Init and state
void drw_debug_clear ()
Draw functions
void drw_debug_line (const float3 v1, const float3 v2, const float4 color, const uint lifetime)
void drw_debug_polygon (Span< float3 > face_verts, const float4 color, const uint lifetime)
void drw_debug_bbox (const BoundBox &bbox, const float4 color, const uint lifetime)
static Vector< float3precompute_sphere_points (int circle_resolution)
void drw_debug_sphere (const float3 center, float radius, const float4 color, const uint lifetime)
void drw_debug_point (const float3 pos, float rad, const float4 col, const uint lifetime)
void drw_debug_matrix (const float4x4 &m4, const uint lifetime)
void drw_debug_matrix_as_bbox (const float4x4 &mat, const float4 color, const uint lifetime)
DRWState to GPU state conversion
static GPUWriteMask to_write_mask (DRWState state)
static GPUFaceCullTest to_face_cull_test (DRWState state)
static GPUDepthTest to_depth_test (DRWState state)
static GPUStencilOp to_stencil_op (DRWState state)
static GPUStencilTest to_stencil_test (DRWState state)
static GPUBlend to_blend (DRWState state)
static GPUProvokingVertex to_provoking_vertex (DRWState state)
Texture
static Imageas_image (gpu::Texture *tex)
static Image ** as_image (gpu::Texture **tex)
static gpu::Textureas_texture (Image *img)
static gpu::Texture ** 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
gpu::VertBufPtr extract_edituv_data (const MeshRenderData &mr)
gpu::VertBufPtr extract_edituv_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
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
gpu::IndexBufPtr extract_edituv_tris (const MeshRenderData &mr, bool edit_uvs)
gpu::IndexBufPtr extract_edituv_tris_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
bool skip_bm_face (const BMFace &face, const bool sync_selection)
static OffsetIndices< int > build_bmesh_face_offsets (const BMesh &bm, Array< int > &r_offset_data)
static gpu::IndexBufPtr extract_edituv_tris_bm (const MeshRenderData &mr, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_tris_mesh (const MeshRenderData &mr, const bool sync_selection)
static gpu::IndexBufPtr build_tris_from_subdiv_quad_selection (const DRWSubdivCache &subdiv_cache, const IndexMask &selection)
static gpu::IndexBufPtr extract_edituv_tris_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_tris_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection)
Extract Edit UV Line Indices around faces
gpu::IndexBufPtr extract_edituv_lines (const MeshRenderData &mr, UvExtractionMode mode)
gpu::IndexBufPtr extract_edituv_lines_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, UvExtractionMode mode)
static gpu::IndexBufPtr extract_edituv_lines_bm (const MeshRenderData &mr, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_lines_mesh (const MeshRenderData &mr, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_lines_subdiv_bm (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_lines_subdiv_mesh (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection)
Extract Edit UV Points Indices
gpu::IndexBufPtr extract_edituv_points (const MeshRenderData &mr)
gpu::IndexBufPtr extract_edituv_points_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
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
gpu::IndexBufPtr extract_edituv_face_dots (const MeshRenderData &mr)
static gpu::IndexBufPtr extract_edituv_face_dots_bm (const MeshRenderData &mr, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_face_dots_mesh (const MeshRenderData &mr, const bool sync_selection)
Extract Attributes
gpu::VertBufPtr extract_attribute (const MeshRenderData &mr, StringRef name)
gpu::VertBufPtr extract_attribute_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, StringRef name)
gpu::VertBufPtr extract_attr_viewer (const MeshRenderData &mr)
static void init_vbo_for_attribute (const MeshRenderData &mr, gpu::VertBuf &vbo, const StringRef name, const bke::AttrType type, 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 void extract_attribute_data (const MeshRenderData &mr, const BMDataLayerLookup &attr, gpu::VertBuf &vbo)
static void extract_attribute_data (const MeshRenderData &mr, const bke::GAttributeReader &attr, gpu::VertBuf &vbo)
static gpu::VertBufPtr init_coarse_data (const bke::AttrType type, const int coarse_corners_num)

Variables

static OpenSubdiv_EvaluatorCacheg_subdiv_evaluator_cache = nullptr
static uint64_t g_subdiv_evaluator_users = 0
static Mutex g_subdiv_eval_mutex
static LinkNodegpu_subdiv_free_queue = nullptr
static blender::Mutex gpu_subdiv_queue_mutex
constexpr uint drw_debug_persistent_lifetime = ~0u

Mesh Render Data

enum class  MeshExtractType { BMesh , Mesh }
const Mesheditmesh_final_or_this (const Object &object, const Mesh &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 StringRef name, int index)

Typedef Documentation

◆ CurvesInfosBuf

◆ DispatchIndirectBuf

◆ DrawIndirectBuf

◆ ObjectBoundsBuf

◆ ObjectInfosBuf

Definition at line 34 of file draw_view.hh.

◆ PassMain

◆ PassSimple

◆ ShadowPageCacheBuf

◆ ShadowTileDataBuf

◆ VisibilityBuf

Definition at line 35 of file draw_view.hh.

◆ VolumeInfosBuf

Enumeration Type Documentation

◆ 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 290 of file draw_cache_impl.hh.

◆ anonymous enum

anonymous enum
Enumerator
COLOR_NURB_ULINE_ID 
TOT_HANDLE_COL 

Definition at line 53 of file draw_cache_impl_curve.cc.

◆ 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 57 of file draw_cache_extract.hh.

◆ anonymous enum

anonymous enum
Enumerator
LR_DATATYPE_VERT 
LR_DATATYPE_EDGE 
LR_DATATYPE_OVERLAY 

Definition at line 109 of file draw_cache_impl_lattice.cc.

◆ 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 304 of file draw_cache_impl.hh.

◆ anonymous enum

anonymous enum
Enumerator
CU_DATATYPE_WIRE 
CU_DATATYPE_OVERLAY 
CU_DATATYPE_NORMAL 
CU_DATATYPE_SURFACE 
CU_DATATYPE_TEXT_SELECT 

Definition at line 181 of file draw_cache_impl_curve.cc.

◆ CurvesEvalShader

Enumerator
CURVES_EVAL_POSITION 
CURVES_EVAL_FLOAT 
CURVES_EVAL_FLOAT2 
CURVES_EVAL_FLOAT3 
CURVES_EVAL_FLOAT4 
CURVES_EVAL_LENGTH_INTERCEPT 

Definition at line 44 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_UV_FACES 
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_PAINT_OVERLAY_WIRE_LOOPS 
MBC_WIRE_LOOPS_ALL_UVS 
MBC_WIRE_LOOPS_UVS 
MBC_WIRE_LOOPS_EDITUVS 
MBC_SCULPT_OVERLAYS 
MBC_VIEWER_ATTRIBUTE_OVERLAY 
MBC_PAINT_OVERLAY_VERTS 
MBC_PAINT_OVERLAY_SURFACE 
MBC_SURFACE_PER_MAT 

Definition at line 197 of file draw_cache_extract.hh.

◆ eDRWLevelOfDetail

Shape resolution level of detail.

Enumerator
DRW_LOD_LOW 
DRW_LOD_MEDIUM 
DRW_LOD_HIGH 
DRW_LOD_MAX 

Definition at line 34 of file draw_cache.hh.

◆ IBOType

enum class blender::draw::IBOType : int8_t
strong

All index buffers used for mesh batches.

Note
"Tris per material" (#MeshBatchCache::tris_per_mat) is an exception. Since there are an arbitrary numbers of materials, those are handled separately (as slices of the overall triangles buffer).
Enumerator
Tris 
Lines 
LinesLoose 
Points 
FaceDots 
LinesPaintMask 
LinesAdjacency 
UVTris 
AllUVLines 
UVLines 
EditUVTris 
EditUVLines 
EditUVPoints 
EditUVFaceDots 

Definition at line 122 of file draw_cache_extract.hh.

◆ InstancesFlags

enum class blender::draw::InstancesFlags : uint8_t
strong
Enumerator
IsNegativeScale 

Definition at line 716 of file draw_context.cc.

◆ MeshExtractType

enum class blender::draw::MeshExtractType
strong
Enumerator
BMesh 
Mesh 

Definition at line 42 of file extract_mesh.hh.

◆ ParticleSource

Enumerator
PARTICLE_SOURCE_PARENT 
PARTICLE_SOURCE_CHILDREN 

Definition at line 583 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 31 of file draw_sculpt.hh.

◆ UvExtractionMode

enum class blender::draw::UvExtractionMode : int8_t
strong
Enumerator
Edit 
Selection 
All 

Definition at line 367 of file extract_mesh.hh.

◆ VBOType

enum class blender::draw::VBOType : int8_t
strong

Vertex buffer types that can be use by batches in the mesh batch cache.

Todo
It would be good to change this to something like #draw::pbvh::AttributeRequest to separate the generic attribute requests. While there is a limit on the number of vertex buffers used by a single shader/batch, there is no need for that limit here; there are potentially many shaders requiring attributes for a particular mesh. OTOH, it may be good to use flags for the builtin buffer types, so that bitwise operations can be used.
Enumerator
Position 
CornerNormal 
EdgeFactor 
VertexGroupWeight 
UVs 
Tangents 
SculptData 
Orco 
EditData 
EditUVData 
EditUVStretchArea 
EditUVStretchAngle 
MeshAnalysis 
FaceDotPosition 
FaceDotNormal 
FaceDotUV 
FaceDotEditUVData 
SkinRoots 
IndexVert 
IndexEdge 
IndexFace 
IndexFaceDot 
Attr0 
Attr1 
Attr2 
Attr3 
Attr5 
Attr6 
Attr7 
Attr8 
Attr9 
Attr10 
Attr11 
Attr12 
Attr13 
Attr14 
Attr15 
AttrViewer 
VertexNormal 
PaintOverlayFlag 

Definition at line 72 of file draw_cache_extract.hh.

Function Documentation

◆ accumululate_material_counts_bm()

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

◆ accumululate_material_counts_mesh()

◆ alloc_evaluated_point_attribute_vbo()

gpu::VertBufPtr blender::draw::alloc_evaluated_point_attribute_vbo ( const GPUVertFormat & format,
const StringRef ,
int64_t size )
static

◆ area_ratio_get()

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

Definition at line 21 of file extract_mesh_vbo_edituv_stretch_area.cc.

References BLI_INLINE.

◆ area_ratio_to_stretch()

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

Definition at line 29 of file extract_mesh_vbo_edituv_stretch_area.cc.

References BLI_INLINE.

◆ as_image() [1/2]

Image ** blender::draw::as_image ( gpu::Texture ** tex)
inlinestatic

Definition at line 1181 of file DRW_gpu_wrapper.hh.

◆ as_image() [2/2]

◆ as_texture() [1/2]

gpu::Texture ** blender::draw::as_texture ( Image ** img)
inlinestatic

Definition at line 1191 of file DRW_gpu_wrapper.hh.

◆ as_texture() [2/2]

gpu::Texture * blender::draw::as_texture ( Image * img)
inlinestatic

◆ attribute_index_in_material()

int blender::draw::attribute_index_in_material ( const GPUMaterial * gpu_material,
const StringRef name,
bool is_curve_length = false,
bool is_curve_intercept = false )
static

◆ attribute_interpolate()

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

◆ axis_from_enum_v3()

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

Definition at line 29 of file extract_mesh_vbo_mesh_analysis.cc.

References v, and zero_v3().

Referenced by statvis_calc_overhang().

◆ batch_cache_is_dirty()

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

◆ bezier_data_value() [1/2]

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

◆ bezier_data_value() [2/2]

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

◆ beztriple_vflag_get()

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

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

◆ bm_face_is_sharp()

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

◆ bm_face_no_get()

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

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

◆ bm_vert_no_get()

◆ bmesh_attribute_exists()

bool blender::draw::bmesh_attribute_exists ( const BMesh & bm,
const bke::AttributeMetaData & meta_data,
const StringRef name )
static

◆ bmesh_normals_domain()

◆ bpoint_vflag_get()

uint8_t blender::draw::bpoint_vflag_get ( CurveRenderData * rdata,
uint8_t flag,
int v_idx,
int nu_id,
int u )
static

◆ build_bmesh_face_offsets()

OffsetIndices< int > blender::draw::build_bmesh_face_offsets ( const BMesh & bm,
Array< int > & r_offset_data )
static

◆ build_edit_selection_indices()

void blender::draw::build_edit_selection_indices ( const PointCloud & pointcloud,
gpu::IndexBuf & ibo )
static

◆ build_poly_other_map_vbo()

◆ build_tris_from_subdiv_quad_selection()

◆ bvh_overlap_cb()

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

◆ calc_adjacency_bm()

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

◆ calc_vert_visibility_mapped_mesh()

◆ calc_vert_visibility_mesh()

◆ calc_visible_loose_edge_indices()

◆ clear_batch_cache()

◆ clear_edit_data()

◆ compute_area_ratio()

◆ compute_coarse_face_flag_bm()

◆ compute_normalize_edge_vectors()

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

◆ count_cache_segment_keys()

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

◆ create_edit_points_data()

◆ create_edit_points_position()

◆ create_edit_points_position_vbo()

◆ create_edit_points_selection()

◆ create_lines_for_remaining_edges()

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

◆ create_lines_ibo_with_cyclic() [1/2]

◆ create_lines_ibo_with_cyclic() [2/2]

void blender::draw::create_lines_ibo_with_cyclic ( const OffsetIndices< int > points_by_curve,
const VArray< bool > & cyclic,
gpu::IndexBuf & ibo )
static

◆ create_material_subranges()

◆ create_segments_with_cyclic()

void blender::draw::create_segments_with_cyclic ( const OffsetIndices< int > points_by_curve,
const VArray< bool > & cyclic,
const IndexMask & selection,
MutableSpan< uint2 > lines )
static

◆ create_vbo()

◆ curve_batch_cache_clear()

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 419 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, i, 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()

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

◆ curve_render_data_create()

◆ curve_render_data_free()

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

Definition at line 247 of file draw_cache_impl_curve.cc.

References MEM_freeN().

Referenced by DRW_curve_batch_cache_create_requested().

◆ curve_render_data_normal_len_get()

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

◆ curve_render_data_overlay_edges_len_get()

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

◆ curve_render_data_overlay_verts_len_get()

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

◆ curve_render_data_wire_curve_len_get()

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

◆ curve_render_data_wire_edges_len_get()

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

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

◆ curve_render_overlay_verts_edges_len_get()

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

Definition at line 71 of file draw_cache_impl_curve.cc.

References BLI_assert, and LISTBASE_FOREACH.

Referenced by curve_render_data_create().

◆ curves_bind_resources()

void blender::draw::curves_bind_resources ( PassMain::Sub & sub_ps,
CurvesModule & module,
CurvesEvalCache & cache,
const int face_per_segment,
GPUMaterial * gpu_material,
gpu::VertBufPtr & indirection_buf,
const std::optional< StringRef > active_uv_name )

◆ curves_bind_resources_implementation()

◆ curves_get_eval_cache()

CurvesEvalCache & blender::draw::curves_get_eval_cache ( Curves & curves_id)

◆ curves_pos_buffer_get()

◆ curves_sub_pass_setup()

◆ curves_sub_pass_setup_implementation()

◆ discard_buffers()

◆ distort_remap()

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

Definition at line 363 of file extract_mesh_vbo_mesh_analysis.cc.

References BLI_INLINE, CLAMP, and blender::math::min().

Referenced by statvis_calc_distort().

◆ draw_patch_map_free()

◆ draw_subdiv_accumulate_normals()

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

void blender::draw::draw_subdiv_build_fdots_buffers ( const DRWSubdivCache & cache,
gpu::VertBuf * fdots_pos,
gpu::VertBuf * fdots_nor,
gpu::IndexBuf * fdots_indices )

Definition at line 1248 of file draw_cache_impl_subdivision.cc.

References blender::opensubdiv::EvalOutputAPI::create_patch_arrays_buf(), draw_subdiv_cache_need_face_data(), DRW_shader_subdiv_get(), drw_subdiv_compute_dispatch(), OpenSubdiv_Evaluator::eval_output, blender::bke::subdiv::Subdiv::evaluator, blender::draw::DRWSubdivCache::extra_coarse_face_data, blender::draw::DRWSubdivCache::fdots_patch_coords, blender::opensubdiv::EvalOutputAPI::get_patch_index_buf(), blender::opensubdiv::EvalOutputAPI::get_patch_param_buf(), blender::opensubdiv::EvalOutputAPI::get_source_buf(), GPU_BARRIER_ELEMENT_ARRAY, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_indexbuf_bind_as_ssbo(), GPU_memory_barrier(), blender::draw::DRWSubdivCache::gpu_patch_map, GPU_shader_bind(), GPU_shader_unbind(), GPU_storagebuf_bind(), GPU_storagebuf_free(), GPU_vertbuf_bind_as_ssbo(), blender::draw::DRWSubdivCache::num_coarse_faces, PATCH_EVALUATION_EXTRA_COARSE_FACE_DATA_BUF_SLOT, PATCH_EVALUATION_FACE_DOTS, PATCH_EVALUATION_FACE_DOTS_WITH_NORMALS, PATCH_EVALUATION_INPUT_PATCH_HANDLES_BUF_SLOT, PATCH_EVALUATION_INPUT_VERTEX_ORIG_INDEX_BUF_SLOT, PATCH_EVALUATION_OUTPUT_FDOTS_VERTEX_BUFFER_BUF_SLOT, PATCH_EVALUATION_OUTPUT_INDICES_BUF_SLOT, PATCH_EVALUATION_OUTPUT_NORMALS_BUF_SLOT, PATCH_EVALUATION_PATCH_ARRAY_BUFFER_BUF_SLOT, PATCH_EVALUATION_PATCH_COORDS_BUF_SLOT, PATCH_EVALUATION_PATCH_INDEX_BUFFER_BUF_SLOT, PATCH_EVALUATION_PATCH_PARAM_BUFFER_BUF_SLOT, PATCH_EVALUATION_QUAD_NODES_BUF_SLOT, PATCH_EVALUATION_SOURCE_VERTEX_BUFFER_BUF_SLOT, blender::draw::DRWPatchMap::patch_map_handles, blender::draw::DRWPatchMap::patch_map_quadtree, blender::draw::DRWSubdivCache::subdiv, UNUSED_VARS, and blender::draw::DRWSubdivCache::verts_orig_index.

Referenced by extract_face_dots_subdiv().

◆ draw_subdiv_build_lines_buffer()

◆ draw_subdiv_build_lines_loose_buffer()

◆ draw_subdiv_build_lnor_buffer()

◆ draw_subdiv_build_origindex_buffer() [1/2]

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

◆ draw_subdiv_build_origindex_buffer() [2/2]

gpu::VertBuf * blender::draw::draw_subdiv_build_origindex_buffer ( Span< int > vert_origindex)

◆ draw_subdiv_build_paint_overlay_flag_buffer()

◆ draw_subdiv_build_sculpt_data_buffer()

◆ draw_subdiv_build_tris_buffer()

◆ draw_subdiv_cache_ensure_mat_offsets()

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 1514 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, i, blender::bke::AttributeAccessor::lookup_or_default(), blender::draw::DRWSubdivCache::mat_end, blender::draw::DRWSubdivCache::mat_start, MEM_calloc_arrayN(), MEM_callocN(), MEM_dupallocN(), MEM_freeN(), MEM_malloc_arrayN(), 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()

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

bool blender::draw::draw_subdiv_create_requested_buffers ( Object & ob,
Mesh & mesh,
MeshBatchCache & batch_cache,
MeshBufferCache & mbc,
const Span< IBOType > ibo_requests,
const Span< VBOType > vbo_requests,
const bool is_editmode,
const bool is_paint_mode,
const bool do_final,
const bool do_uvedit,
const bool do_cage,
const ToolSettings * ts,
const bool use_hide )
static

Definition at line 1590 of file draw_cache_impl_subdivision.cc.

References Geometry::attributes, BKE_object_get_editmesh_eval_final(), BKE_subsurf_modifier_subdiv_descriptor_ensure(), BLI_assert, blender::draw::DRWSubdivCache::bm, bm, blender::Span< T >::contains(), draw_subdiv_cache_ensure_mat_offsets(), draw_subdiv_cache_update_extra_coarse_face_data(), blender::draw::MeshRenderData::edit_bmesh, blender::bke::subdiv::eval_begin_from_mesh(), blender::bke::subdiv::Subdiv::evaluator, Mesh::faces_num, g_subdiv_eval_mutex, g_subdiv_evaluator_cache, g_subdiv_evaluator_users, SubsurfRuntimeData::has_gpu_subdiv, blender::draw::DRWSubdivCache::hide_unmapped_edges, blender::draw::DRWSubdivCache::is_edit_mode, blender::bke::subdiv::Settings::level, lock, blender::draw::MeshBatchCache::mat_len, blender::draw::DRWSubdivCache::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, openSubdiv_createEvaluatorCache(), OPENSUBDIV_EVALUATOR_GPU, blender::draw::DRWSubdivCache::optimal_display, Mesh::runtime, 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, 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_extract_pos()

void blender::draw::draw_subdiv_extract_pos ( const DRWSubdivCache & cache,
gpu::VertBuf * pos,
gpu::VertBuf * orco )

Definition at line 980 of file draw_cache_impl_subdivision.cc.

References blender::opensubdiv::EvalOutputAPI::create_patch_arrays_buf(), draw_subdiv_cache_need_face_data(), DRW_shader_subdiv_get(), drw_subdiv_compute_dispatch(), OpenSubdiv_Evaluator::eval_output, blender::bke::subdiv::Subdiv::evaluator, blender::opensubdiv::EvalOutputAPI::get_patch_index_buf(), blender::opensubdiv::EvalOutputAPI::get_patch_param_buf(), blender::opensubdiv::EvalOutputAPI::get_source_buf(), blender::opensubdiv::EvalOutputAPI::get_source_data_buf(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), blender::draw::DRWSubdivCache::gpu_patch_map, GPU_shader_bind(), GPU_shader_unbind(), GPU_storagebuf_bind(), GPU_storagebuf_free(), GPU_vertbuf_bind_as_ssbo(), blender::draw::DRWSubdivCache::num_subdiv_quads, blender::draw::DRWSubdivCache::patch_coords, PATCH_EVALUATION, PATCH_EVALUATION_INPUT_PATCH_HANDLES_BUF_SLOT, PATCH_EVALUATION_ORCO, PATCH_EVALUATION_OUTPUT_ORCOS_BUF_SLOT, PATCH_EVALUATION_OUTPUT_POS_BUF_SLOT, PATCH_EVALUATION_PATCH_ARRAY_BUFFER_BUF_SLOT, PATCH_EVALUATION_PATCH_COORDS_BUF_SLOT, PATCH_EVALUATION_PATCH_INDEX_BUFFER_BUF_SLOT, PATCH_EVALUATION_PATCH_PARAM_BUFFER_BUF_SLOT, PATCH_EVALUATION_QUAD_NODES_BUF_SLOT, PATCH_EVALUATION_SOURCE_EXTRA_VERTEX_BUFFER_BUF_SLOT, PATCH_EVALUATION_SOURCE_VERTEX_BUFFER_BUF_SLOT, blender::draw::DRWPatchMap::patch_map_handles, blender::draw::DRWPatchMap::patch_map_quadtree, pos, blender::draw::DRWSubdivCache::subdiv, and UNUSED_VARS.

Referenced by extract_edituv_stretch_angle_subdiv(), and extract_positions_subdiv().

◆ draw_subdiv_extract_uvs()

void blender::draw::draw_subdiv_extract_uvs ( const DRWSubdivCache & cache,
gpu::VertBuf * uvs,
const int face_varying_channel,
const int dst_offset )

Definition at line 1037 of file draw_cache_impl_subdivision.cc.

References blender::draw::DRWSubdivCache::corner_patch_coords, blender::opensubdiv::EvalOutputAPI::create_face_varying_patch_array_buf(), draw_subdiv_cache_need_face_data(), DRW_shader_subdiv_get(), drw_subdiv_compute_dispatch(), OpenSubdiv_Evaluator::eval_output, blender::bke::subdiv::Subdiv::evaluator, blender::opensubdiv::EvalOutputAPI::get_face_varying_patch_index_buf(), blender::opensubdiv::EvalOutputAPI::get_face_varying_patch_param_buf(), blender::opensubdiv::EvalOutputAPI::get_face_varying_source_buf(), blender::opensubdiv::EvalOutputAPI::get_face_varying_source_offset(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), blender::draw::DRWSubdivCache::gpu_patch_map, GPU_shader_bind(), GPU_shader_unbind(), GPU_storagebuf_bind(), GPU_storagebuf_free(), GPU_vertbuf_bind_as_ssbo(), blender::draw::DRWSubdivCache::num_subdiv_quads, PATCH_EVALUATION_FVAR, PATCH_EVALUATION_INPUT_PATCH_HANDLES_BUF_SLOT, PATCH_EVALUATION_OUTPUT_FVAR_BUF_SLOT, PATCH_EVALUATION_PATCH_ARRAY_BUFFER_BUF_SLOT, PATCH_EVALUATION_PATCH_COORDS_BUF_SLOT, PATCH_EVALUATION_PATCH_INDEX_BUFFER_BUF_SLOT, PATCH_EVALUATION_PATCH_PARAM_BUFFER_BUF_SLOT, PATCH_EVALUATION_QUAD_NODES_BUF_SLOT, PATCH_EVALUATION_SOURCE_VERTEX_BUFFER_BUF_SLOT, blender::draw::DRWPatchMap::patch_map_handles, blender::draw::DRWPatchMap::patch_map_quadtree, blender::draw::DRWSubdivCache::subdiv, and UNUSED_VARS.

Referenced by extract_uv_maps_subdiv().

◆ draw_subdiv_free_edit_mode_cache()

◆ draw_subdiv_init_origindex_buffer() [1/2]

◆ draw_subdiv_init_origindex_buffer() [2/2]

gpu::VertBufPtr blender::draw::draw_subdiv_init_origindex_buffer ( Span< int32_t > vert_origindex,
uint loose_len )

◆ draw_subdiv_init_ubo_storage()

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

◆ draw_subdiv_interp_corner_normals()

◆ draw_subdiv_interp_custom_data()

◆ draw_subdiv_ubo_update_and_bind()

void blender::draw::draw_subdiv_ubo_update_and_bind ( const DRWSubdivCache & cache,
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

◆ drw_attributes_add_request()

◆ drw_attributes_merge()

◆ drw_attributes_overlap()

◆ DRW_batch_cache_free_old()

◆ drw_batch_cache_generate_requested()

◆ drw_batch_cache_generate_requested_delayed()

void blender::draw::drw_batch_cache_generate_requested_delayed ( Object * ob)
Warning
Only evaluated mesh data is handled by this delayed generation.

Definition at line 558 of file draw_cache.cc.

References BLI_gset_add(), BLI_gset_ptr_new(), DRWContext::delayed_extraction, and drw_get().

Referenced by drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), and drw_shgroup_custom_bone_curve().

◆ drw_batch_cache_generate_requested_evaluated_mesh_or_curve()

◆ drw_batch_cache_validate()

◆ DRW_cache_curve_edge_normal_get()

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

◆ DRW_cache_curve_edge_overlay_get()

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

◆ DRW_cache_curve_edge_wire_get()

◆ DRW_cache_curve_edge_wire_viewer_attribute_get()

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

◆ DRW_cache_curve_vert_overlay_get()

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

◆ DRW_cache_free_old_subdiv()

◆ DRW_cache_grease_pencil_color_buffer_get()

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

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

◆ DRW_cache_lattice_verts_get()

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

◆ DRW_cache_lattice_wire_get()

◆ DRW_cache_mesh_all_edges_get()

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

◆ DRW_cache_mesh_all_verts_get()

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

◆ DRW_cache_mesh_edge_detection_get()

gpu::Batch * blender::draw::DRW_cache_mesh_edge_detection_get ( Object * ob,
bool * r_is_manifold )

◆ DRW_cache_mesh_face_wireframe_get()

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

◆ DRW_cache_mesh_loose_edges_get()

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

◆ DRW_cache_mesh_paint_overlay_edges_get()

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

◆ DRW_cache_mesh_paint_overlay_surface_get()

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

◆ DRW_cache_mesh_paint_overlay_verts_get()

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

◆ DRW_cache_mesh_surface_get()

◆ DRW_cache_mesh_surface_mesh_analysis_get()

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

◆ DRW_cache_mesh_surface_sculptcolors_get()

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

◆ DRW_cache_mesh_surface_shaded_get() [1/2]

Span< gpu::Batch * > blender::draw::DRW_cache_mesh_surface_shaded_get ( Object * ob,
const Span< const GPUMaterial * > materials )

◆ DRW_cache_mesh_surface_shaded_get() [2/2]

Span< gpu::Batch * > blender::draw::DRW_cache_mesh_surface_shaded_get ( Object * ob,
Span< const GPUMaterial * > materials )

Return list of batches with length equal to max(1, totcol).

◆ DRW_cache_mesh_surface_texpaint_get()

Span< gpu::Batch * > blender::draw::DRW_cache_mesh_surface_texpaint_get ( Object * ob)

Return list of batches with length equal to max(1, totcol).

Definition at line 223 of file draw_cache.cc.

References BLI_assert, DRW_mesh_batch_cache_get_surface_texpaint(), DRW_object_get_data_for_drawing(), OB_MESH, and Object::type.

Referenced by blender::workbench::Instance::mesh_sync().

◆ DRW_cache_mesh_surface_texpaint_single_get()

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

◆ DRW_cache_mesh_surface_vertpaint_get()

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

◆ DRW_cache_mesh_surface_viewer_attribute_get()

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

◆ DRW_cache_mesh_surface_weights_get()

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

◆ DRW_cache_object_all_edges_get()

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

Definition at line 91 of file draw_cache.cc.

References DRW_cache_mesh_all_edges_get(), OB_MESH, and Object::type.

◆ DRW_cache_object_edge_detection_get()

gpu::Batch * blender::draw::DRW_cache_object_edge_detection_get ( Object * ob,
bool * r_is_manifold )

◆ DRW_cache_object_face_wireframe_get()

◆ DRW_cache_object_loose_edges_get()

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

Definition at line 128 of file draw_cache.cc.

References DRW_cache_mesh_loose_edges_get(), OB_MESH, and Object::type.

◆ DRW_cache_object_surface_get()

◆ DRW_cache_object_surface_material_get() [1/2]

Span< gpu::Batch * > blender::draw::DRW_cache_object_surface_material_get ( Object * ob,
const Span< const GPUMaterial * > materials )

◆ DRW_cache_object_surface_material_get() [2/2]

Span< gpu::Batch * > blender::draw::DRW_cache_object_surface_material_get ( Object * ob,
Span< const GPUMaterial * > materials )

◆ DRW_cache_particles_get_dots()

gpu::Batch * blender::draw::DRW_cache_particles_get_dots ( Object * object,
ParticleSystem * psys )

◆ DRW_cache_particles_get_edit_inner_points()

gpu::Batch * blender::draw::DRW_cache_particles_get_edit_inner_points ( Object * object,
ParticleSystem * psys,
PTCacheEdit * edit )

◆ DRW_cache_particles_get_edit_strands()

gpu::Batch * blender::draw::DRW_cache_particles_get_edit_strands ( Object * object,
ParticleSystem * psys,
PTCacheEdit * edit,
bool use_weight )

◆ DRW_cache_particles_get_edit_tip_points()

gpu::Batch * blender::draw::DRW_cache_particles_get_edit_tip_points ( Object * object,
ParticleSystem * psys,
PTCacheEdit * edit )

◆ DRW_cache_particles_get_hair()

gpu::Batch * blender::draw::DRW_cache_particles_get_hair ( Object * object,
ParticleSystem * psys,
ModifierData * md )

◆ DRW_cache_pointcloud_vert_overlay_get()

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

◆ DRW_cache_surf_edge_wire_get()

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

◆ DRW_cache_text_edge_wire_get()

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

◆ DRW_cache_volume_face_wireframe_get()

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

◆ DRW_cache_volume_selection_surface_get()

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

◆ DRW_cdlayer_attr_aliases_add()

void blender::draw::DRW_cdlayer_attr_aliases_add ( GPUVertFormat * format,
const char * base_name,
bke::AttrType data_type,
blender::StringRef layer_name,
bool is_active_render,
bool is_active_layer )

◆ DRW_create_subdivision()

void blender::draw::DRW_create_subdivision ( Object & ob,
Mesh & mesh,
MeshBatchCache & batch_cache,
MeshBufferCache & mbc,
const Span< IBOType > ibo_requests,
const Span< VBOType > vbo_requests,
const bool is_editmode,
const bool is_paint_mode,
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()

void blender::draw::DRW_curve_batch_cache_create_requested ( Object * ob,
const Scene * scene )

Definition at line 844 of file draw_cache_impl_curve.cc.

References blender::draw::CurveBatchCache::attr_viewer, blender::draw::CurveBatchCache::batch, BLI_assert, CU_DATATYPE_NORMAL, CU_DATATYPE_OVERLAY, CU_DATATYPE_WIRE, curve_batch_cache_get(), curve_create_attribute(), curve_create_curves_lines(), curve_create_curves_pos(), curve_create_edit_curves_nor(), curve_create_edit_data_and_handles(), curve_render_data_create(), curve_render_data_free(), blender::draw::CurveBatchCache::curves, blender::draw::CurveBatchCache::curves_lines, blender::draw::CurveBatchCache::curves_nor, blender::draw::CurveBatchCache::curves_pos, blender::draw::CurveBatchCache::curves_viewer_attribute, blender::draw::CurveBatchCache::data, Object::data, DRW_ADD_FLAG_FROM_IBO_REQUEST, DRW_ADD_FLAG_FROM_VBO_REQUEST, DRW_batch_requested(), DRW_ibo_request(), DRW_ibo_requested(), DRW_vbo_request(), DRW_vbo_requested(), blender::draw::CurveBatchCache::edit, blender::draw::CurveBatchCache::edit_edges, blender::draw::CurveBatchCache::edit_lines, blender::draw::CurveBatchCache::edit_normals, blender::draw::CurveBatchCache::edit_verts, ELEM, GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, i, blender::draw::CurveBatchCache::ibo, Object::id, ID::name, OB_CURVES_LEGACY, OB_FONT, OB_SURF, blender::draw::CurveBatchCache::ordered, blender::draw::CurveBatchCache::pos, printf, Object::runtime, and Object::type.

Referenced by drw_batch_cache_generate_requested(), and drw_batch_cache_generate_requested_evaluated_mesh_or_curve().

◆ DRW_curve_batch_cache_dirty_tag()

◆ DRW_curve_batch_cache_free()

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

Definition at line 444 of file draw_cache_impl_curve.cc.

References Curve::batch_cache, curve_batch_cache_clear(), and MEM_SAFE_FREE.

Referenced by DRW_module_init().

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

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

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

Definition at line 1024 of file draw_cache_impl_curves.cc.

References blender::bke::CurvesGeometry::attributes(), calc_edit_handles_ibo(), create_edit_points_data(), create_edit_points_position(), create_edit_points_position_vbo(), create_edit_points_selection(), create_lines_ibo_no_cyclic(), create_lines_ibo_with_cyclic(), CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, blender::bke::CurvesGeometry::curve_type_counts(), CURVE_TYPE_NURBS, CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), DEG_get_original(), DRW_batch_requested(), DRW_ibo_request(), DRW_ibo_requested(), DRW_object_get_data_for_drawing(), DRW_vbo_request(), DRW_vbo_requested(), blender::draw::CurvesBatchCache::edit_curves_lines, blender::draw::CurvesBatchCache::edit_curves_lines_ibo, blender::draw::CurvesBatchCache::edit_curves_lines_pos, blender::draw::CurvesBatchCache::edit_handles, blender::draw::CurvesBatchCache::edit_handles_ibo, blender::draw::CurvesBatchCache::edit_points, blender::draw::CurvesBatchCache::edit_points_data, blender::draw::CurvesBatchCache::edit_points_pos, blender::draw::CurvesBatchCache::edit_points_selection, blender::bke::CurvesGeometry::evaluated_points_by_curve(), blender::offset_indices::gather_selected_offsets(), Curves::geometry, get_batch_cache(), blender::bke::crazyspace::get_evaluated_curves_deformation(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, blender::bke::curves::indices_for_type(), blender::bke::CurvesGeometry::points_by_curve(), blender::draw::CurvesBatchCache::sculpt_cage, blender::draw::CurvesBatchCache::sculpt_cage_ibo, and blender::index_mask::IndexMask::size().

Referenced by drw_batch_cache_generate_requested().

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

Definition at line 922 of file draw_cache_impl_curves.cc.

References Curves::batch_cache, and clear_batch_cache().

Referenced by DRW_module_init().

◆ DRW_curves_batch_cache_free_old()

◆ DRW_curves_batch_cache_get_edit_curves_handles()

gpu::Batch * blender::draw::DRW_curves_batch_cache_get_edit_curves_handles ( Curves * curves)

◆ DRW_curves_batch_cache_get_edit_curves_lines()

gpu::Batch * blender::draw::DRW_curves_batch_cache_get_edit_curves_lines ( Curves * curves)

◆ DRW_curves_batch_cache_get_edit_points()

gpu::Batch * blender::draw::DRW_curves_batch_cache_get_edit_points ( Curves * curves)

◆ DRW_curves_batch_cache_get_sculpt_curves_cage()

gpu::Batch * blender::draw::DRW_curves_batch_cache_get_sculpt_curves_cage ( Curves * curves)

◆ DRW_curves_batch_cache_validate()

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

◆ DRW_curves_begin_sync()

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

◆ drw_curves_get_attribute_sampler_name()

◆ DRW_curves_init()

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

Definition at line 72 of file draw_curves.cc.

References DRWData::curves_module, DRWContext::data, and drw_get().

Referenced by DRWData::modules_init().

◆ DRW_curves_module_free()

void blender::draw::DRW_curves_module_free ( draw::CurvesModule * module)

Definition at line 87 of file draw_curves.cc.

Referenced by DRW_viewport_data_free().

◆ DRW_curves_texture_for_evaluated_attribute()

gpu::VertBufPtr & blender::draw::DRW_curves_texture_for_evaluated_attribute ( Curves * curves,
StringRef name,
bool & r_is_point_domain,
bool & r_valid_attribute )

◆ DRW_curves_update()

◆ drw_custom_data_match_attribute()

bool blender::draw::drw_custom_data_match_attribute ( const CustomData & custom_data,
const StringRef name,
int * r_layer_index,
eCustomDataType * r_type )

◆ drw_debug_bbox()

void blender::draw::drw_debug_bbox ( const BoundBox & bbox,
const float4 color,
const uint lifetime )

◆ drw_debug_clear()

void blender::draw::drw_debug_clear ( )

Clear all debug visuals (regardless of visual's lifetime).

Usually called before populating persistent data to override previous visuals. Needs an active GPUContext.

Definition at line 78 of file draw_debug.cc.

References blender::draw::DebugDraw::get(), and blender::draw::DebugDraw::reset().

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ drw_debug_line()

void blender::draw::drw_debug_line ( float3 v1,
float3 v2,
float4 color = {1, 0, 0, 1},
uint lifetime = 1 )

Drawing functions that will draw wire-frames with the given color.

IMPORTANT: lifetime is in unit of display and not in unit of time. One display is defined as one call to DebugDraw::display_to_view which happens once per 3D viewport if overlays are not turned off.

  • The default value of 1 is good for continuous event debugging in one viewport.
  • Above 1 is a good value for infrequent events or to compare continuous event history. Alternatively also allows replicating the display to several viewport.
  • drw_debug_persistent_lifetime is a good value for manually triggered event (e.g. an operator). It is best to clear the display cache (using drw_debug_clear) before adding new persistent visuals.

All added debug drawing will be shared across viewports. If lifetime is greater than 1 or if a viewport doesn't display the visuals it produced, the visuals will be displayed onto other viewport(s).

These functions are threadsafe and can be called concurrently at anytime, even outside the UI redraw loop.

Definition at line 89 of file draw_debug.cc.

References debug_color_pack(), blender::draw::DebugDraw::draw_line(), blender::draw::DebugDraw::get(), and v2.

◆ drw_debug_matrix()

void blender::draw::drw_debug_matrix ( const float4x4 & m4,
uint lifetime = 1 )

Draw a matrix transform as 3 colored axes.

Definition at line 170 of file draw_debug.cc.

References debug_color_pack(), blender::draw::DebugDraw::draw_line(), blender::draw::DebugDraw::get(), blender::math::transform_point(), and v2.

◆ drw_debug_matrix_as_bbox()

void blender::draw::drw_debug_matrix_as_bbox ( const float4x4 & mat,
float4 color = {1, 0, 0, 1},
uint lifetime = 1 )

◆ drw_debug_point()

void blender::draw::drw_debug_point ( float3 pos,
float rad = 0.01f,
float4 col = {1, 0, 0, 1},
uint lifetime = 1 )

◆ drw_debug_polygon()

void blender::draw::drw_debug_polygon ( Span< float3 > face_verts,
const float4 color,
const uint lifetime )

◆ drw_debug_sphere()

void blender::draw::drw_debug_sphere ( const float3 center,
float radius,
const float4 color,
const uint lifetime )

◆ DRW_grease_pencil_batch_cache_dirty_tag()

◆ DRW_grease_pencil_batch_cache_free()

void blender::draw::DRW_grease_pencil_batch_cache_free ( GreasePencil * grease_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_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.

Definition at line 1147 of file draw_cache_impl_mesh.cc.

References blender::draw::MeshBatchList::all_edges, blender::draw::MeshBatchList::all_verts, AllUVLines, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Attr0, blender::draw::MeshBatchCache::attr_needed, blender::draw::MeshBatchCache::attr_used, blender::draw::MeshBatchCache::attr_used_over_time, AttrViewer, batch, blender::draw::MeshBatchCache::batch, blender::draw::MeshBatchCache::batch_ready, blender::draw::MeshBatchCache::batch_requested, BKE_editmesh_eval_orig_map_available(), BKE_object_get_editmesh_eval_final(), BKE_object_get_pre_modified_mesh(), BKE_subsurf_modifier_has_gpu_subdiv(), BLI_assert, blender::draw::MeshBufferCache::buff, buffers, blender::draw::MeshBatchCache::cage, blender::draw::MeshBatchCache::cd_needed, CD_ORCO, blender::draw::MeshBatchCache::cd_used, blender::draw::MeshBatchCache::cd_used_over_time, VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), CornerNormal, create_material_subranges(), CustomData_get_layer(), drw_attributes_merge(), drw_attributes_overlap(), DRW_create_subdivision(), drw_mesh_weight_state_clear(), drw_mesh_weight_state_copy(), drw_mesh_weight_state_extract(), DRW_object_get_editmesh_cage_for_drawing(), blender::draw::MeshBatchList::edge_detection, EdgeFactor, 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, EditData, Mesh::editflag, 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::MeshBatchList::edituv_verts, EditUVData, EditUVFaceDots, EditUVLines, EditUVPoints, EditUVStretchAngle, EditUVStretchArea, EditUVTris, ELEM, blender::draw::MeshBufferCache::face_sorted, FaceDotEditUVData, FaceDotNormal, FaceDotPosition, FaceDots, FaceDotUV, blender::draw::MeshBatchCache::final, FOREACH_MESH_BUFFER_CACHE, GPU_BATCH_CLEAR_SAFE, GPU_batch_init, GPU_batch_vertbuf_add(), GPU_MAX_ATTR, GPU_PRIM_LINES, GPU_PRIM_LINES_ADJ, GPU_PRIM_POINTS, GPU_PRIM_TRIS, i, VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), IndexEdge, IndexFace, IndexFaceDot, IndexVert, init_empty_dummy_batch(), blender::draw::MeshBatchCache::is_uvsyncsel, Lines, LinesAdjacency, LinesLoose, LinesPaintMask, 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_PAINT_OVERLAY_SURFACE, MBC_PAINT_OVERLAY_VERTS, MBC_PAINT_OVERLAY_WIRE_LOOPS, MBC_SCULPT_OVERLAYS, MBC_SKIN_ROOTS, MBC_SURFACE, MBC_SURFACE_PER_MAT, MBC_SURFACE_WEIGHTS, MBC_UV_FACES, MBC_VIEWER_ATTRIBUTE_OVERLAY, MBC_WIRE_EDGES, MBC_WIRE_LOOPS_ALL_UVS, MBC_WIRE_LOOPS_EDITUVS, MBC_WIRE_LOOPS_UVS, ME_EDIT_PAINT_FACE_SEL, ME_WRAPPER_TYPE_BMESH, 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(), MeshAnalysis, Object::mode, OB_MESH, OB_MODE_EDIT, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, Orco, blender::draw::DRW_MeshCDMask::orco, blender::draw::MeshBatchList::paint_overlay_surface, blender::draw::MeshBatchList::paint_overlay_verts, blender::draw::MeshBatchList::paint_overlay_wire_loops, PaintOverlayFlag, blender::bke::object::pbvh_get(), Points, Position, Mesh::runtime, blender::draw::DRW_MeshCDMask::sculpt_overlays, blender::draw::MeshBatchList::sculpt_overlays, SculptData, SkinRoots, 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::DRW_MeshCDMask::tan_orco, Tangents, Scene::toolsettings, Tris, blender::draw::MeshBatchCache::tris_per_mat, Object::type, blender::bke::pbvh::update_normals_from_eval(), blender::draw::DRW_MeshCDMask::uv, blender::draw::MeshBatchCache::uv_cage, blender::draw::MeshBatchList::uv_faces, ToolSettings::uv_flag, UV_FLAG_SELECT_SYNC, UVLines, UVs, UVTris, blender::draw::MeshBufferList::vbos, Mesh::vert_data, VertexGroupWeight, VertexNormal, blender::draw::MeshBatchCache::weight_state, blender::draw::MeshBatchList::wire_edges, blender::draw::MeshBatchList::wire_loops_all_uvs, blender::draw::MeshBatchList::wire_loops_edituvs, and blender::draw::MeshBatchList::wire_loops_uvs.

Referenced by drw_batch_cache_generate_requested(), and drw_batch_cache_generate_requested_evaluated_mesh_or_curve().

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

References mesh_batch_cache_clear().

Referenced by DRW_module_init().

◆ DRW_mesh_batch_cache_free_old()

◆ DRW_mesh_batch_cache_get_all_edges()

◆ DRW_mesh_batch_cache_get_all_uv_wireframe()

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

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_area update are calculation are only valid after calling DRW_mesh_batch_cache_create_requested.

Definition at line 1006 of file draw_cache_impl_mesh.cc.

References blender::draw::MeshBatchCache::batch, blender::draw::MeshBatchCache::batch_requested, DRW_batch_request(), blender::draw::MeshBatchList::edituv_faces_stretch_area, edituv_request_active_uv(), MBC_EDITUV_FACES_STRETCH_AREA, 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_edituv_wireframe()

◆ DRW_mesh_batch_cache_get_facedots_with_select_id()

◆ DRW_mesh_batch_cache_get_loose_edges()

◆ DRW_mesh_batch_cache_get_paint_overlay_edges()

◆ DRW_mesh_batch_cache_get_paint_overlay_surface()

◆ DRW_mesh_batch_cache_get_paint_overlay_verts()

◆ DRW_mesh_batch_cache_get_sculpt_overlays()

◆ DRW_mesh_batch_cache_get_surface()

◆ DRW_mesh_batch_cache_get_surface_sculpt()

◆ DRW_mesh_batch_cache_get_surface_shaded() [1/2]

◆ DRW_mesh_batch_cache_get_surface_shaded() [2/2]

Span< gpu::Batch * > blender::draw::DRW_mesh_batch_cache_get_surface_shaded ( Object & object,
Mesh & mesh,
Span< const GPUMaterial * > materials )

◆ DRW_mesh_batch_cache_get_surface_texpaint()

Span< gpu::Batch * > blender::draw::DRW_mesh_batch_cache_get_surface_texpaint ( Object & object,
Mesh & mesh )

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

◆ DRW_mesh_batch_cache_get_surface_weights()

◆ DRW_mesh_batch_cache_get_triangles_with_select_id()

◆ DRW_mesh_batch_cache_get_uv_faces()

◆ DRW_mesh_batch_cache_get_uv_wireframe()

◆ DRW_mesh_batch_cache_get_verts_with_select_id()

◆ DRW_mesh_batch_cache_get_wireframes_face()

◆ DRW_mesh_batch_cache_validate()

◆ drw_mesh_flags_equal()

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

Definition at line 354 of file draw_cache_impl_mesh.cc.

References size().

Referenced by drw_mesh_weight_state_compare().

◆ DRW_mesh_get_attributes() [1/2]

void blender::draw::DRW_mesh_get_attributes ( const Object & object,
const Mesh & mesh,
const Span< const GPUMaterial * > materials,
VectorSet< std::string > * r_attrs,
DRW_MeshCDMask * r_cd_needed )

Definition at line 801 of file draw_cache_impl_mesh.cc.

References mesh_cd_calc_used_gpu_layers().

Referenced by sculpt_batches_per_material_get().

◆ DRW_mesh_get_attributes() [2/2]

void blender::draw::DRW_mesh_get_attributes ( const Object & object,
const Mesh & mesh,
Span< const GPUMaterial * > materials,
VectorSet< std::string > * r_attrs,
DRW_MeshCDMask * r_cd_needed )

◆ drw_mesh_weight_state_clear()

◆ drw_mesh_weight_state_compare()

◆ drw_mesh_weight_state_copy()

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

◆ DRW_pointcloud_batch_cache_validate()

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

◆ DRW_pointcloud_evaluated_attribute()

◆ DRW_pointcloud_init()

void blender::draw::DRW_pointcloud_init ( DRWData * drw_data = nullptr)

Definition at line 54 of file draw_pointcloud.cc.

References DRWContext::data, drw_get(), and DRWData::pointcloud_module.

Referenced by DRWData::modules_init().

◆ DRW_pointcloud_module_free()

void blender::draw::DRW_pointcloud_module_free ( draw::PointCloudModule * module)

Definition at line 64 of file draw_pointcloud.cc.

Referenced by DRW_viewport_data_free().

◆ DRW_pointcloud_position_and_radius_buffer_get()

◆ DRW_subdiv_cache_free()

void blender::draw::DRW_subdiv_cache_free ( bke::subdiv::Subdiv * subdiv)

◆ drw_subdiv_compute_dispatch()

void blender::draw::drw_subdiv_compute_dispatch ( const DRWSubdivCache & cache,
gpu::Shader * 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_subdivide_loose_geom()

◆ DRW_vertbuf_create_wiredata()

void blender::draw::DRW_vertbuf_create_wiredata ( gpu::VertBuf * vbo,
const int vert_len )

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

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

void blender::draw::DRW_volume_init ( DRWData * drw_data = nullptr)

Definition at line 92 of file draw_volume.cc.

References DRWContext::data, drw_get(), and DRWData::volume_module.

Referenced by DRWData::modules_init().

◆ DRW_volume_module_free()

void blender::draw::DRW_volume_module_free ( draw::VolumeModule * module)

Definition at line 103 of file draw_volume.cc.

References module.

Referenced by DRW_viewport_data_free().

◆ drw_volume_object_mesh_init()

◆ drw_volume_selection_surface_cb()

◆ drw_volume_wireframe_cb()

◆ edge_factor_calc()

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

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

Definition at line 32 of file extract_mesh_vbo_edge_fac.cc.

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

Referenced by extract_edge_factor_mesh().

◆ edge_from_corners()

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

◆ edge_len_calc()

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

Definition at line 43 of file draw_cache_impl_lattice.cc.

References v, and w().

Referenced by lattice_render_edges_len_get().

◆ edit_points_vert_format_get()

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

◆ editmesh_final_or_this()

◆ edituv_data_format()

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

◆ edituv_get_edituv_stretch_angle()

◆ edituv_request_active_uv()

◆ ensure_control_point_attribute()

◆ ensure_curve_attribute()

◆ ensure_dependency_data()

◆ ensure_edit_inner_points_count()

◆ ensure_edit_tip_points_count()

◆ ensure_seg_pt_count()

◆ ENUM_OPERATORS() [1/3]

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

References MBC_SURFACE_PER_MAT.

◆ ENUM_OPERATORS() [2/3]

blender::draw::ENUM_OPERATORS ( InstancesFlags ,
InstancesFlags::IsNegativeScale  )

References IsNegativeScale.

◆ ENUM_OPERATORS() [3/3]

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

References SCULPT_BATCH_UV.

◆ evaluate_vertex_weight()

◆ extract_attr_viewer()

◆ extract_attribute()

◆ extract_attribute_data() [1/2]

◆ extract_attribute_data() [2/2]

◆ extract_attribute_subdiv()

◆ extract_data_bmesh_edge()

template<typename T>
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>
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>
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>
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>
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>
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()

void blender::draw::extract_edge_factor_bm ( const MeshRenderData & mr,
MutableSpan< float > 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() [1/2]

◆ extract_edit_data() [2/2]

void blender::draw::extract_edit_data ( const OffsetIndices< int > points_by_curve,
const IndexMask & curve_selection,
const VArray< bool > & selection_attr,
const bool mark_active,
const uint32_t fill_value,
MutableSpan< uint32_t > data )
static

◆ extract_edit_data_bm()

◆ extract_edit_data_mesh()

◆ extract_edit_data_subdiv()

◆ extract_edit_flags_bm()

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

◆ extract_edit_subdiv_data_bm()

◆ extract_edit_subdiv_data_mesh()

◆ extract_edituv_data()

◆ extract_edituv_data_bm()

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

◆ extract_edituv_data_iter_subdiv_bm()

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

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

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

◆ extract_edituv_tris_mesh()

◆ extract_edituv_tris_subdiv()

◆ extract_edituv_tris_subdiv_bm()

◆ extract_edituv_tris_subdiv_mesh()

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

◆ extract_face_dot_positions_bm()

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

◆ extract_face_dot_positions_mesh()

◆ extract_face_dots()

gpu::IndexBufPtr blender::draw::extract_face_dots ( const MeshRenderData & mr)

◆ extract_face_dots_bm()

◆ extract_face_dots_edituv_data()

◆ extract_face_dots_mesh()

gpu::IndexBufPtr blender::draw::extract_face_dots_mesh ( const MeshRenderData & mr)
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()

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

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>
void blender::draw::extract_face_normals ( const MeshRenderData & mr,
MutableSpan< GPUType > normals )
static

◆ extract_face_normals_bm()

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

◆ extract_lines()

void blender::draw::extract_lines ( const MeshRenderData & mr,
gpu::IndexBufPtr * lines,
gpu::IndexBufPtr * 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()

◆ extract_normals_mesh()

◆ extract_normals_subdiv()

◆ extract_orco()

◆ extract_paint_overlay_flags() [1/2]

◆ extract_paint_overlay_flags() [2/2]

◆ extract_paint_overlay_flags_subdiv()

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

◆ extract_sculpt_data()

◆ extract_sculpt_data_subdiv()

◆ extract_set_bits()

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

Definition at line 37 of file draw_cache_extract_mesh_render_data.cc.

References BLI_assert, count, i, and indices.

◆ extract_skin_roots()

◆ extract_tan_init_common()

Array< Array< float4 > > blender::draw::extract_tan_init_common ( const MeshRenderData & mr,
const MeshBatchCache & cache,
GPUVertFormat * format,
gpu::VertAttrType gpu_attr_type )
static

Definition at line 26 of file extract_mesh_vbo_tan.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Geometry::attributes, BKE_editmesh_orco_tangents_calc(), BKE_editmesh_uv_tangents_calc(), BKE_mesh_orco_verts_transform(), blender::draw::MeshRenderData::bm, blender::draw::MeshRenderData::bm_face_normals, blender::draw::MeshRenderData::bm_loop_normals, BM_mesh_vert_coords_alloc(), BMesh, blender::bke::mesh::calc_orco_tangents(), blender::bke::mesh::calc_uv_tangents(), CD_ORCO, CD_PROP_FLOAT2, blender::draw::MeshBatchCache::cd_used, blender::bke::Corner, Mesh::corner_data, blender::draw::MeshRenderData::corner_normals, blender::draw::MeshRenderData::corner_verts, CustomData_get_active_layer(), CustomData_get_layer(), CustomData_get_layer_index(), CustomData_get_layer_name(), CustomData_get_render_layer(), blender::draw::MeshRenderData::edit_bmesh, blender::draw::MeshRenderData::extract_type, blender::draw::MeshRenderData::face_normals, blender::draw::MeshRenderData::faces, GPU_MAX_SAFE_ATTR_NAME, GPU_vertformat_alias_add(), GPU_vertformat_attr_add(), GPU_vertformat_deinterleave(), GPU_vertformat_safe_attr_name(), i, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), BMesh::ldata, blender::bke::AttributeAccessor::lookup(), MAX_MTFACE, blender::draw::MeshRenderData::mesh, blender::draw::MeshRenderData::sharp_faces, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SNPRINTF, blender::draw::DRW_MeshCDMask::tan, blender::draw::DRW_MeshCDMask::tan_orco, 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()

gpu::IndexBufPtr blender::draw::extract_tris ( const MeshRenderData & mr,
const SortedFaceData & face_sorted )

◆ 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>
void blender::draw::extract_vert_normals ( const Span< int > corner_verts,
const Span< float3 > vert_normals,
MutableSpan< GPUType > normals )
static

◆ extract_vert_normals_bm() [1/2]

◆ extract_vert_normals_bm() [2/2]

◆ extract_vert_normals_mesh()

◆ extract_weights()

◆ extract_weights_bm()

◆ extract_weights_mesh()

◆ extract_weights_subdiv()

◆ fill_loose_lines_ibo()

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

◆ foreach_obref_in_scene()

void blender::draw::foreach_obref_in_scene ( DRWContext & draw_ctx,
FunctionRef< bool(Object &)> should_draw_object_cb,
FunctionRef< void(ObjectRef &)> draw_object_cb )
static

Definition at line 777 of file draw_context.cc.

References BKE_object_visibility(), BKE_scene_uses_blender_workbench(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), blender::VectorList< T, CapacityStart, CapacityMax >::clear(), DEG_get_mode(), DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, DEG_iterator_dupli_is_visible(), DEG_iterator_object_is_visible(), evil::DEG_iterator_temp_object_free_properties(), evil::DEG_iterator_temp_object_from_dupli(), DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEGObjectIterSettings::depsgraph, depsgraph, DRWContext::depsgraph, View3D::flag2, DEGObjectIterSettings::flags, foreach_obref_in_scene(), DEGObjectIterSettings::included_objects, invert(), blender::VectorList< T, CapacityStart, CapacityMax >::is_empty(), is_negative_m4(), IsNegativeScale, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), Object::light_linking, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), OB_DUPLI, OB_NEG_SCALE, OB_SOLID, OB_VISIBLE_INSTANCES, OB_VISIBLE_PARTICLES, OB_VISIBLE_SELF, object_duplilist(), Object::runtime, DRWContext::scene, SET_FLAG_FROM_TEST, View3D::shading, supports_handle_ranges(), Object::transflag, View3DShading::type, DRWContext::v3d, V3D_SHOW_VIEWER, DEGObjectIterSettings::viewer_path, and View3D::viewer_path.

Referenced by DRW_draw_depth_loop(), drw_draw_render_loop_3d(), DRW_draw_select_id(), DRW_draw_select_loop(), DRW_render_object_iter(), and foreach_obref_in_scene().

◆ get_batch_cache()

◆ get_cdata()

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

Definition at line 133 of file draw_sculpt.cc.

References bm, blender::bke::Corner, blender::bke::Face, and blender::bke::Point.

Referenced by bmesh_attribute_exists().

◆ get_coarse_tan_format()

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

Definition at line 192 of file extract_mesh_vbo_tan.cc.

References GPU_vertformat_from_attribute().

Referenced by extract_tangents_subdiv().

◆ get_dispatch_size()

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

◆ get_edit_data_format()

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

◆ get_edituv_stretch_angle_format_subdiv()

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

◆ get_fdots_nor_format_subdiv()

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

Definition at line 24 of file extract_mesh_vbo_fdots_pos.cc.

References GPU_vertformat_from_attribute().

Referenced by extract_face_dots_subdiv().

◆ get_fdots_pos_format()

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

◆ get_first_uv_name() [1/3]

◆ get_first_uv_name() [2/3]

◆ get_first_uv_name() [3/3]

◆ get_normals_format()

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

◆ get_origindex_format()

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

◆ get_paint_overlay_flag_format()

◆ get_sculpt_data_format()

const GPUVertFormat & blender::draw::get_sculpt_data_format ( )
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()

◆ grease_pencil_cache_add_nurbs()

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

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

◆ grease_pencil_edit_batch_ensure()

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

Definition at line 720 of file draw_cache_impl_grease_pencil.cc.

References blender::MutableSpan< T >::as_span(), bezier_data_value(), BLI_assert, blender::MutableSpan< T >::cast(), blender::array_utils::copy(), blender::array_utils::count_booleans(), CURVE_HANDLE_ALL, CURVE_TYPE_POLY, blender::gpu::VertBuf::data(), EDIT_CURVES_BEZIER_KNOT, blender::draw::GreasePencilBatchCache::edit_handles, blender::draw::GreasePencilBatchCache::edit_handles_ibo, 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_info, blender::draw::GreasePencilBatchCache::edit_points_pos, blender::draw::GreasePencilBatchCache::edit_points_selection, blender::draw::GreasePencilBatchCache::edit_points_vflag, blender::IndexRange::first(), blender::index_mask::IndexMask::foreach_index(), blender::array_utils::gather(), GPU_batch_create, GPU_batch_vertbuf_add(), GPU_indexbuf_build_ex(), GPU_indexbuf_get_data(), GPU_indexbuf_init(), GPU_indexbuf_init_ex(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_USAGE_STATIC, GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), GPU_vertformat_from_attribute(), 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_handle_lines(), index_buf_add_bezier_line_points(), index_buf_add_line_points(), index_buf_add_nurbs_lines(), index_buf_add_points(), blender::draw::GreasePencilBatchCache::is_dirty, blender::index_mask::IndexMask::is_empty(), blender::IndexRange::last(), blender::index_mask::masked_fill(), blender::bke::Point, pos, 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(), blender::MutableSpan< T >::slice(), blender::offset_indices::sum_group_sizes(), blender::bke::greasepencil::Layer::to_object_space(), and blender::math::transform_points().

Referenced by DRW_cache_grease_pencil_edit_handles_get(), DRW_cache_grease_pencil_edit_lines_get(), and DRW_cache_grease_pencil_edit_points_get().

◆ grease_pencil_geom_batch_ensure()

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

Definition at line 1132 of file draw_cache_impl_grease_pencil.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), attribute_interpolate(), BLI_assert, blender::MutableSpan< T >::cast(), 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_build_ex(), GPU_indexbuf_get_data(), 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_geom_batch_ensure(), grease_pencil_stroke_format(), i, blender::draw::GreasePencilBatchCache::ibo, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), interpolate_corners(), blender::math::invert(), is_cyclic(), blender::draw::GreasePencilBatchCache::is_dirty, blender::IndexRange::last(), blender::MutableSpan< T >::last(), blender::ed::greasepencil::DrawingInfo::layer_index, blender::bke::AttributeAccessor::lookup_or_default(), blender::math::max(), blender::bke::greasepencil::Drawing::opacities(), pack_rotation_aspect_hardness_miter(), blender::bke::Point, pos, blender::bke::greasepencil::Drawing::radii(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::ed::greasepencil::retrieve_visible_strokes(), GreasePencil::runtime, blender::index_mask::IndexMask::size(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::texture_matrices(), blender::bke::greasepencil::Layer::to_object_space(), 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(), grease_pencil_geom_batch_ensure(), and grease_pencil_wire_batch_ensure().

◆ grease_pencil_get_visible_non_nurbs_curves()

IndexMask blender::draw::grease_pencil_get_visible_non_nurbs_curves ( Object & object,
const bke::greasepencil::Drawing & drawing,
const int layer_index,
IndexMaskMemory & memory )
static

◆ grease_pencil_get_visible_nurbs_curves()

◆ grease_pencil_get_visible_nurbs_points()

◆ grease_pencil_stroke_format()

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

◆ grease_pencil_weight_batch_ensure()

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

Definition at line 279 of file draw_cache_impl_grease_pencil.cc.

References 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::IndexRange::first(), blender::index_mask::IndexMask::foreach_index(), GPU_batch_create, GPU_batch_vertbuf_add(), GPU_indexbuf_build_ex(), GPU_indexbuf_get_data(), GPU_indexbuf_init(), 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_use(), GPU_vertformat_from_attribute(), grease_pencil_batch_cache_is_edit_discarded(), is_cyclic(), blender::draw::GreasePencilBatchCache::is_dirty, blender::VArrayCommon< T >::materialize(), bDeformGroup::name, blender::bke::Point, blender::gpu::RESTART_INDEX, blender::ed::greasepencil::retrieve_visible_drawings(), blender::ed::greasepencil::retrieve_visible_strokes(), GreasePencil::runtime, blender::index_mask::IndexMask::size(), blender::MutableSpan< T >::slice(), blender::offset_indices::sum_group_sizes(), blender::bke::greasepencil::Layer::to_object_space(), blender::math::transform_points(), 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_init()

void blender::draw::hair_init ( )

Hair.

◆ hair_particle_get_eval_cache()

◆ hair_pos_buffer_get()

◆ hair_shape_radius()

float blender::draw::hair_shape_radius ( float shape,
float root,
float tip,
float time )
static

Definition at line 1560 of file draw_cache_impl_particles.cc.

References BLI_assert, and powf.

Referenced by blender::draw::CurvesEvalCache::ensure_positions().

◆ hair_sub_pass_setup()

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

◆ hair_sub_pass_setup_implementation()

◆ handle_range_left()

IndexRange blender::draw::handle_range_left ( const int points_num,
const OffsetIndices< int > bezier_offsets )
static

◆ handle_range_right()

IndexRange blender::draw::handle_range_right ( const int points_num,
const OffsetIndices< int > bezier_offsets )
static

◆ handles_and_points_num()

int blender::draw::handles_and_points_num ( const int points_num,
const OffsetIndices< int > bezier_offsets )
static

◆ index_buf_add_bezier_handle_lines()

void blender::draw::index_buf_add_bezier_handle_lines ( const IndexMask bezier_points,
const int all_points,
MutableSpan< uint2 > handle_lines,
int * r_drawing_line_index,
int * r_drawing_line_start_offset )
static

◆ index_buf_add_bezier_line_points()

void blender::draw::index_buf_add_bezier_line_points ( const IndexMask bezier_points,
MutableSpan< uint > points_data,
int * r_drawing_point_index,
int * r_drawing_start_offset )
static

◆ index_buf_add_line_points()

void blender::draw::index_buf_add_line_points ( Object & object,
const bke::greasepencil::Drawing & drawing,
const int layer_index,
IndexMaskMemory & memory,
MutableSpan< uint > lines_data,
int * r_drawing_line_index,
int * r_drawing_line_start_offset )
static

◆ index_buf_add_nurbs_lines()

void blender::draw::index_buf_add_nurbs_lines ( Object & object,
const bke::greasepencil::Drawing & drawing,
int layer_index,
IndexMaskMemory & memory,
MutableSpan< uint > lines_data,
int * r_drawing_line_index,
int * r_drawing_line_start_offset )
static

◆ index_buf_add_points()

void blender::draw::index_buf_add_points ( Object & object,
const bke::greasepencil::Drawing & drawing,
int layer_index,
IndexMaskMemory & memory,
MutableSpan< uint > points_data,
int * r_drawing_point_index,
int * r_drawing_start_offset )
static

◆ index_mask_to_ibo() [1/2]

gpu::IndexBufPtr blender::draw::index_mask_to_ibo ( const IndexMask & mask)
static

◆ index_mask_to_ibo() [2/2]

◆ init_batch_cache()

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

◆ init_coarse_data()

gpu::VertBufPtr blender::draw::init_coarse_data ( const bke::AttrType type,
const int coarse_corners_num )
static

◆ init_empty_dummy_batch()

void blender::draw::init_empty_dummy_batch ( gpu::Batch & batch)
static

◆ init_format_for_attribute()

GPUVertFormat blender::draw::init_format_for_attribute ( const bke::AttrType data_type,
const StringRef vbo_name )

◆ init_vbo_for_attribute()

◆ interpolate() [1/2]

template<typename ParticleDataT>
float4 blender::draw::interpolate ( const ParticleDataT & particle,
Span< MFace > mfaces,
Span< MCol > mcols )
static

◆ interpolate() [2/2]

template<typename ParticleDataT>
float2 blender::draw::interpolate ( const ParticleDataT & particle,
Span< MFace > mfaces,
Span< MTFace > mtfaces )
static

◆ interpolate_corners()

◆ interpolate_face_corner_attribute_to_curve()

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

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

◆ lattice_render_data_free()

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

◆ lattice_render_data_vert_bpoint()

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

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

◆ lattice_render_verts_len_get()

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

◆ mesh_batch_cache_check_vertex_group()

◆ mesh_batch_cache_clear()

◆ mesh_batch_cache_discard_shaded_tri()

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

◆ mesh_batch_cache_discard_uvedit()

◆ mesh_batch_cache_discard_uvedit_select()

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

◆ mesh_batch_cache_ensure_subdiv_cache()

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

◆ mesh_batch_cache_free_subdiv_cache()

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

◆ mesh_batch_cache_get()

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

Definition at line 510 of file draw_cache_impl_mesh.cc.

References Mesh::runtime.

Referenced by DRW_mesh_batch_cache_create_requested(), DRW_mesh_batch_cache_get_all_edges(), DRW_mesh_batch_cache_get_all_uv_wireframe(), 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_edituv_wireframe(), DRW_mesh_batch_cache_get_facedots_with_select_id(), DRW_mesh_batch_cache_get_loose_edges(), DRW_mesh_batch_cache_get_paint_overlay_edges(), DRW_mesh_batch_cache_get_paint_overlay_surface(), DRW_mesh_batch_cache_get_paint_overlay_verts(), DRW_mesh_batch_cache_get_sculpt_overlays(), DRW_mesh_batch_cache_get_surface(), 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_faces(), DRW_mesh_batch_cache_get_uv_wireframe(), DRW_mesh_batch_cache_get_verts_with_select_id(), and DRW_mesh_batch_cache_get_wireframes_face().

◆ mesh_batch_cache_init()

◆ mesh_batch_cache_request_surface_batches()

◆ mesh_batch_cache_valid()

◆ mesh_buffer_cache_clear()

◆ mesh_buffer_cache_create_requested()

◆ mesh_buffer_cache_create_requested_subdiv()

void blender::draw::mesh_buffer_cache_create_requested_subdiv ( MeshBatchCache & cache,
MeshBufferCache & mbc,
Span< IBOType > ibo_requests,
Span< VBOType > vbo_requests,
DRWSubdivCache & subdiv_cache,
MeshRenderData & mr )

Definition at line 334 of file draw_cache_extract_mesh.cc.

References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), All, AllUVLines, Attr0, blender::draw::MeshBatchCache::attr_used, blender::draw::MeshBufferCache::buff, buffers, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CornerNormal, DRW_subdivide_loose_geom(), EdgeFactor, Edit, EditData, EditUVData, EditUVLines, EditUVPoints, EditUVStretchAngle, EditUVStretchArea, EditUVTris, extract_attribute_subdiv(), extract_edge_factor_subdiv(), extract_edge_index_subdiv(), extract_edit_data_subdiv(), extract_edituv_data_subdiv(), extract_edituv_lines_subdiv(), extract_edituv_points_subdiv(), extract_edituv_stretch_angle_subdiv(), extract_edituv_stretch_area_subdiv(), extract_edituv_tris_subdiv(), extract_face_dots_subdiv(), extract_face_index_subdiv(), extract_lines_adjacency_subdiv(), extract_lines_paint_mask_subdiv(), extract_lines_subdiv(), extract_normals_subdiv(), extract_paint_overlay_flags_subdiv(), extract_points_subdiv(), extract_positions_subdiv(), extract_sculpt_data_subdiv(), extract_tangents_subdiv(), extract_tris_subdiv(), extract_uv_maps_subdiv(), extract_vert_index_subdiv(), extract_weights_subdiv(), FaceDotNormal, FaceDotPosition, FaceDots, GPU_MAX_ATTR, i, IndexEdge, IndexFace, IndexVert, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::Span< T >::is_empty(), blender::draw::MeshBatchCache::is_manifold, Lines, LinesAdjacency, LinesLoose, LinesPaintMask, mesh_buffer_cache_create_requested_subdiv(), mesh_render_data_update_corner_normals(), mesh_render_data_update_loose_geom(), blender::draw::MeshBatchCache::no_loose_wire, Orco, PaintOverlayFlag, Points, Position, blender::gpu::DebugScope::scoped_capture(), SculptData, Selection, Tangents, blender::draw::MeshBatchCache::tot_area, blender::draw::MeshBatchCache::tot_uv_area, Tris, UVLines, UVs, and VertexGroupWeight.

Referenced by draw_subdiv_create_requested_buffers(), and mesh_buffer_cache_create_requested_subdiv().

◆ mesh_cd_calc_active_mask_uv_layer()

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

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

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

Definition at line 150 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()

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

References b, and BLI_INLINE.

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

References b, and BLI_INLINE.

Referenced by DRW_mesh_batch_cache_create_requested().

◆ mesh_cd_ldata_get_from_mesh()

◆ mesh_cd_pdata_get_from_mesh()

◆ mesh_cd_vdata_get_from_mesh()

◆ mesh_extract_uv_format_init()

◆ mesh_is_single_material()

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

◆ mesh_render_data_create()

MeshRenderData blender::draw::mesh_render_data_create ( Object & object,
Mesh & mesh,
bool is_editmode,
bool is_paint_mode,
bool do_final,
bool do_uvedit,
bool use_hide,
const ToolSettings * ts )
Parameters
edit_mode_activeWhen true, use the modifiers from the edit-data, otherwise don't use modifiers as they are not from this object.

Definition at line 534 of file draw_cache_extract_mesh_render_data.cc.

References Geometry::attributes, BKE_editmesh_cache_ensure_face_normals(), BKE_editmesh_cache_ensure_vert_normals(), BKE_object_get_pre_modified_mesh(), BKE_object_material_used_with_fallback_eval(), blender::draw::MeshRenderData::bm, bm, BM_EDGE, BM_FACE, blender::draw::MeshRenderData::bm_face_normals, blender::draw::MeshRenderData::bm_free_normal_offset_corner, blender::draw::MeshRenderData::bm_free_normal_offset_face, blender::draw::MeshRenderData::bm_free_normal_offset_vert, BM_LOOP, BM_mesh_active_edge_get(), BM_mesh_active_face_get(), BM_mesh_active_vert_get(), BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, blender::draw::MeshRenderData::bm_vert_coords, blender::draw::MeshRenderData::bm_vert_normals, BMesh, bmesh_normals_domain(), blender::draw::MeshRenderData::bweight_ofs, CD_ORIGINDEX, CD_PROP_BOOL, CD_PROP_FLOAT, CD_PROP_FLOAT3, blender::draw::MeshRenderData::corner_edges, blender::draw::MeshRenderData::corner_tris_num, blender::draw::MeshRenderData::corner_verts, blender::draw::MeshRenderData::corners_num, Mesh::corners_num, CustomData_get_layer(), CustomData_get_offset_named(), DRW_object_get_editmesh_cage_for_drawing(), BMesh::edata, EDBM_uv_active_face_get(), blender::bke::Edge, blender::draw::MeshRenderData::edge_crease_ofs, Mesh::edge_data, blender::draw::MeshRenderData::edges, blender::draw::MeshRenderData::edges_num, Mesh::edges_num, blender::draw::MeshRenderData::edit_bmesh, blender::draw::MeshRenderData::edit_data, blender::draw::MeshRenderData::eed_act, blender::draw::MeshRenderData::efa_act, blender::draw::MeshRenderData::efa_act_uv, blender::draw::MeshRenderData::eve_act, blender::draw::MeshRenderData::extract_type, blender::bke::Face, Mesh::face_data, blender::draw::MeshRenderData::faces, blender::draw::MeshRenderData::faces_num, Mesh::faces_num, blender::draw::MeshRenderData::freestyle_edge_ofs, blender::draw::MeshRenderData::freestyle_face_ofs, blender::draw::MeshRenderData::hide_edge, blender::draw::MeshRenderData::hide_poly, blender::draw::MeshRenderData::hide_unmapped_edges, blender::draw::MeshRenderData::hide_vert, BMesh::ldata, blender::bke::AttributeAccessor::lookup(), blender::draw::MeshRenderData::material_indices, blender::draw::MeshRenderData::materials_num, ME_WRAPPER_TYPE_BMESH, Mesh, blender::draw::MeshRenderData::mesh, mesh_render_data_create(), blender::draw::MeshRenderData::normals_domain, blender::draw::MeshRenderData::orig_index_edge, blender::draw::MeshRenderData::orig_index_face, blender::draw::MeshRenderData::orig_index_vert, BMesh::pdata, blender::bke::Point, poly_to_tri_count(), retrieve_active_attribute_names(), Mesh::runtime, blender::draw::MeshRenderData::select_edge, blender::draw::MeshRenderData::select_poly, blender::draw::MeshRenderData::select_vert, blender::draw::MeshRenderData::sharp_faces, blender::draw::MeshRenderData::toolsettings, blender::draw::MeshRenderData::use_hide, BMesh::vdata, blender::draw::MeshRenderData::vert_crease_ofs, Mesh::vert_data, blender::bke::EditMeshData::vert_positions, blender::draw::MeshRenderData::vert_positions, blender::draw::MeshRenderData::verts_num, and Mesh::verts_num.

Referenced by draw_subdiv_create_requested_buffers(), mesh_buffer_cache_create_requested(), and 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()

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

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

◆ overhang_remap()

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

◆ pack_rotation_aspect_hardness_miter()

BLI_INLINE int32_t blender::draw::pack_rotation_aspect_hardness_miter ( const float rot,
const float asp,
const float softness,
const float miter_angle )

◆ particle_batch_cache_clear()

◆ particle_batch_cache_clear_hair()

◆ particle_batch_cache_clear_point()

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

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

◆ particle_batch_cache_fill_segments()

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

◆ particle_batch_cache_init()

◆ particle_batch_cache_valid()

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

◆ particle_calculate_mcol()

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

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

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

◆ particle_mcol_convert()

float4 blender::draw::particle_mcol_convert ( const MCol & mcol)
static

◆ particle_mface_index() [1/2]

int blender::draw::particle_mface_index ( const ChildParticle & particle,
int  )
static

Definition at line 1311 of file draw_cache_impl_particles.cc.

References ChildParticle::num.

◆ particle_mface_index() [2/2]

int blender::draw::particle_mface_index ( const ParticleData & particle,
int face_count_legacy )
static

◆ particle_pack_mcol()

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

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

◆ pointcloud_sub_pass_setup_implementation()

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

◆ pointcloud_surface_get()

◆ pointcloud_surface_shaded_get()

◆ precompute_sphere_points()

Vector< float3 > blender::draw::precompute_sphere_points ( int circle_resolution)
static

Definition at line 128 of file draw_debug.cc.

References angle(), cosf, float, M_PI, result, and sinf.

Referenced by drw_debug_point(), and drw_debug_sphere().

◆ process_ibo_verts_bm()

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

◆ process_ibo_verts_mesh()

template<typename Fn>
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 50 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()

◆ set_attribute_type()

bool blender::draw::set_attribute_type ( const GPUMaterial * gpu_material,
const StringRef name,
CurvesInfosBuf & curves_infos,
const bool is_point_domain )
static

◆ sharp_remap()

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

Definition at line 465 of file extract_mesh_vbo_mesh_analysis.cc.

References BLI_INLINE, CLAMP, and blender::math::min().

Referenced by statvis_calc_sharp().

◆ skip_bm_face()

◆ span_from_custom_data_layer() [1/2]

template<typename T>
Span< T > blender::draw::span_from_custom_data_layer ( const Mesh & mesh,
const eCustomDataType type )

◆ span_from_custom_data_layer() [2/2]

template<typename T>
Span< T > blender::draw::span_from_custom_data_layer ( const Mesh & mesh,
const eCustomDataType type,
const StringRef name )

◆ statvis_calc_distort()

◆ statvis_calc_intersect()

◆ statvis_calc_overhang()

◆ statvis_calc_sharp()

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

◆ statvis_calc_thickness()

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

Definition at line 129 of file extract_mesh_vbo_mesh_analysis.cc.

References BKE_bmbvh_free(), BKE_bmbvh_new_from_editmesh(), BKE_bmbvh_ray_cast(), 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(), BMesh, 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(), BVHTreeRayHit::dist, 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, i, BVHTreeRayHit::index, blender::Span< T >::index_range(), interp_v3_v3v3v3_uv(), BMFace::len, BMEditMesh::looptris, madd_v3_v3fl(), mat4_to_scale(), blender::math::max(), blender::draw::MeshRenderData::mesh, blender::math::min(), BVHTreeRayHit::no, normal_tri_v3(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::bke::BVHTreeFromMesh::raycast_callback, blender::math::scale(), ToolSettings::statvis, MeshStatVis::thickness_max, MeshStatVis::thickness_min, thickness_remap(), MeshStatVis::thickness_samples, blender::draw::MeshRenderData::toolsettings, blender::bke::BVHTreeFromMesh::tree, 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 254 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()

◆ 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

◆ supports_handle_ranges()

◆ test_draw_curves_interpolate_attributes()

void blender::draw::test_draw_curves_interpolate_attributes ( )
static

Definition at line 895 of file draw_curves_test.cc.

References blender::gpu::VertBuf::allocate(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), BASIS_CACHE_OFFSET_SLOT, BASIS_CACHE_SLOT, BEZIER_OFFSETS_SLOT, blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::StorageCommon< T, len, device_only >::clear_to_zero(), CONTROL_WEIGHTS_SLOT, CURVE_CYCLIC_SLOT, CURVE_RESOLUTION_SLOT, CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, CURVE_TYPE_SLOT, CURVES_ORDER_SLOT, blender::gpu::VertBuf::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), data, Vector< T, InlineBufferCapacity, Allocator >::data(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), EVALUATED_ATTR_SLOT, EVALUATED_POINT_SLOT, EXPECT_EQ(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), Float, GPU_BARRIER_BUFFER_UPDATE, GPU_shader_create_from_info_name(), GPU_SHADER_FREE_SAFE, GPU_shader_unbind(), GPU_vertbuf_create_with_format(), GPU_VERTBUF_DISCARD_SAFE, GPU_VERTEX_FORMAT_FUNC, HANDLES_POS_LEFT_SLOT, HANDLES_POS_RIGHT_SLOT, blender::draw::detail::Pass< DrawCommandBufType >::init(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::curves::nurbs::BasisCache::invalid, blender::bke::curves::per_curve_point_offsets_range(), POINT_ATTR_SLOT, POINTS_BY_CURVES_SLOT, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Vector< T, InlineBufferCapacity, Allocator >::size(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::bke::curves::nurbs::BasisCache::start_indices, blender::draw::Manager::submit(), test_draw_curves_interpolate_attributes(), and blender::bke::curves::nurbs::BasisCache::weights.

Referenced by test_draw_curves_interpolate_attributes().

◆ test_draw_curves_interpolate_position()

void blender::draw::test_draw_curves_interpolate_position ( )
static

Definition at line 362 of file draw_curves_test.cc.

References blender::gpu::VertBuf::allocate(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), BASIS_CACHE_OFFSET_SLOT, BASIS_CACHE_SLOT, BEZIER_OFFSETS_SLOT, blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::draw::detail::StorageCommon< T, len, device_only >::clear_to_zero(), CONTROL_WEIGHTS_SLOT, CURVE_CYCLIC_SLOT, CURVE_RESOLUTION_SLOT, CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, CURVE_TYPE_SLOT, CURVES_LENGTH_SLOT, CURVES_ORDER_SLOT, blender::gpu::VertBuf::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), data, Vector< T, InlineBufferCapacity, Allocator >::data(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::math::distance(), EVALUATED_POINT_SLOT, EVALUATED_POS_RAD_SLOT, EVALUATED_TIME_SLOT, EXPECT_EQ(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), GPU_BARRIER_BUFFER_UPDATE, GPU_BARRIER_SHADER_STORAGE, GPU_shader_create_from_info_name(), GPU_SHADER_FREE_SAFE, GPU_shader_unbind(), GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_vertbuf_create_with_format(), GPU_vertbuf_create_with_format_ex(), GPU_VERTBUF_DISCARD_SAFE, GPU_VERTEX_FORMAT_FUNC, HANDLES_POS_LEFT_SLOT, HANDLES_POS_RIGHT_SLOT, i, blender::MatBase< float, 4, 4 >::identity(), blender::draw::detail::Pass< DrawCommandBufType >::init(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::curves::nurbs::BasisCache::invalid, blender::bke::curves::per_curve_point_offsets_range(), POINT_POSITIONS_SLOT, POINT_RADII_SLOT, POINTS_BY_CURVES_SLOT, pos, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Vector< T, InlineBufferCapacity, Allocator >::size(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::math::numbers::sqrt3, blender::bke::curves::nurbs::BasisCache::start_indices, blender::draw::Manager::submit(), test_draw_curves_interpolate_position(), w(), blender::bke::curves::nurbs::BasisCache::weights, and x.

Referenced by test_draw_curves_interpolate_position().

◆ test_draw_curves_lib()

◆ test_draw_curves_topology()

◆ test_draw_manager_sync()

◆ test_draw_pass_all_commands()

void blender::draw::test_draw_pass_all_commands ( )
static

Definition at line 21 of file draw_pass_test.cc.

References blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ubo(), blender::draw::detail::PassBase< DrawCommandBufType >::clear_color_depth_stencil(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::draw::detail::PassBase< DrawCommandBufType >::draw_procedural(), DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_STENCIL, blender::draw::Texture::ensure_2d(), EXPECT_EQ(), fb(), blender::draw::detail::PassBase< DrawCommandBufType >::framebuffer_set(), GPU_ATTACHMENT_IGNORE, GPU_ATTACHMENT_READ, GPU_ATTACHMENT_WRITE, GPU_BARRIER_SHADER_IMAGE_ACCESS, GPU_PRIM_TRIS, GPU_SHADER_3D_IMAGE_COLOR, GPU_shader_get_builtin_shader(), GPU_shader_get_uniform(), blender::MatBase< float, 4, 4 >::identity(), blender::draw::detail::Pass< DrawCommandBufType >::init(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::detail::UniformCommon< T, len, device_only >::push_update(), result, blender::draw::detail::PassBase< DrawCommandBufType >::serialize(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), blender::draw::detail::PassBase< DrawCommandBufType >::state_stencil(), and blender::draw::detail::PassBase< DrawCommandBufType >::subpass_transition().

◆ test_draw_pass_multi_draw()

◆ test_draw_pass_simple_draw()

◆ test_draw_pass_sortable()

◆ test_draw_pass_sub_ordering()

◆ test_draw_resource_id_gen()

◆ test_draw_submit_only()

◆ test_draw_visibility()

◆ test_eevee_lut_gen()

◆ test_eevee_shadow_alloc()

void blender::draw::test_eevee_shadow_alloc ( )
static

Definition at line 742 of file eevee_test.cc.

References SHADOW_MAX_PAGE.

◆ test_eevee_shadow_defrag()

void blender::draw::test_eevee_shadow_defrag ( )
static

Definition at line 632 of file eevee_test.cc.

References SHADOW_MAX_PAGE.

◆ test_eevee_shadow_finalize()

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 750 of file eevee_test.cc.

References blender::draw::StorageVectorBuffer< T, len >::append(), blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), 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, blender::eevee::ShadowTileMapClip::clip_near_stored, data, blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), 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_render_begin(), GPU_render_end(), GPU_shader_create_from_info_name(), GPU_shader_free(), GPU_shader_unbind(), GPU_TEXTURE_USAGE_HOST_READ, GPU_TEXTURE_USAGE_SHADER_READ, GPU_TEXTURE_USAGE_SHADER_WRITE, blender::eevee::ShadowTileMapData::half_size, i, 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::draw::detail::PassBase< DrawCommandBufType >::shader_set(), 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(), test_eevee_shadow_finalize(), tile, blender::eevee::ShadowTileMapData::tiles_index, blender::eevee::ShadowStatistics::view_needed_count, blender::eevee::ShadowTileMapData::viewmat, x, and y.

Referenced by test_eevee_shadow_finalize().

◆ test_eevee_shadow_free()

void blender::draw::test_eevee_shadow_free ( )
static

Definition at line 368 of file eevee_test.cc.

References blender::draw::StorageVectorBuffer< T, len >::append(), blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::StorageCommon< T, len, device_only >::clear_to_zero(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), DRW_shaders_free(), EXPECT_EQ(), GPU_BARRIER_BUFFER_UPDATE, GPU_render_begin(), GPU_render_end(), GPU_shader_create_from_info_name(), GPU_shader_free(), GPU_shader_unbind(), i, 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::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), SHADOW_MAX_PAGE, blender::eevee::shadow_page_pack(), SHADOW_PAGE_PER_COL, SHADOW_PAGE_PER_LAYER, SHADOW_PAGE_PER_ROW, blender::eevee::shadow_tile_pack(), blender::eevee::shadow_tile_unpack(), SHADOW_TILEDATA_PER_TILEMAP, blender::draw::StorageArrayBuffer< T, len, device_only >::size(), blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::Manager::submit(), test_eevee_shadow_free(), tile, and blender::eevee::ShadowTileMapData::tiles_index.

Referenced by test_eevee_shadow_free().

◆ test_eevee_shadow_page_mask()

void blender::draw::test_eevee_shadow_page_mask ( )
static

Definition at line 1813 of file eevee_test.cc.

References test_eevee_shadow_page_mask_ex().

◆ test_eevee_shadow_page_mask_ex()

void blender::draw::test_eevee_shadow_page_mask_ex ( int max_view_per_tilemap)
static

◆ test_eevee_shadow_shift()

void blender::draw::test_eevee_shadow_shift ( )
static

◆ test_eevee_shadow_shift_clear()

◆ test_eevee_shadow_tag_update()

void blender::draw::test_eevee_shadow_tag_update ( )
static

The layout of these expected strings is Y down.

Definition at line 196 of file eevee_test.cc.

References blender::draw::StorageVectorBuffer< T, len >::append(), blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::Manager::begin_sync(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::Manager::bounds_buf, blender::draw::detail::StorageCommon< T, len, device_only >::clear_to_zero(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::eevee::ShadowTileData::do_update, DRW_shaders_free(), blender::draw::Manager::end_sync(), EXPECT_EQ(), blender::math::from_loc_rot_scale(), GPU_BARRIER_BUFFER_UPDATE, GPU_render_begin(), GPU_render_end(), GPU_shader_create_from_info_name(), GPU_shader_free(), GPU_shader_unbind(), i, blender::MatBase< float, 4, 4 >::identity(), blender::math::QuaternionBase< float >::identity(), len, blender::eevee::LIGHT_OMNI_SPHERE, blender::math::projection::orthographic(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::draw::Manager::resource_handle(), blender::draw::ResourceHandle::resource_index(), result, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::eevee::SHADOW_PROJECTION_CLIPMAP, 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_LOD5_LEN, blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::Manager::submit(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::eevee::ShadowTileMap::sync_orthographic(), test_eevee_shadow_tag_update(), view, and blender::eevee::Z_NEG.

Referenced by test_eevee_shadow_tag_update().

◆ test_eevee_shadow_tile_packing()

◆ test_eevee_shadow_tilemap_amend()

void blender::draw::test_eevee_shadow_tilemap_amend ( )
static

The layout of these expected strings is Y down.

Definition at line 1224 of file eevee_test.cc.

References blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), DRW_shaders_free(), blender::draw::Texture::ensure_2d(), EXPECT_EQ(), blender::Vector< T, InlineBufferCapacity, Allocator >::fill(), GPU_BARRIER_TEXTURE_UPDATE, GPU_DATA_UINT, GPU_render_begin(), GPU_render_end(), GPU_shader_create_from_info_name(), GPU_shader_free(), GPU_shader_unbind(), GPU_texture_update_sub(), GPU_TEXTURE_USAGE_HOST_READ, GPU_TEXTURE_USAGE_SHADER_READ, GPU_TEXTURE_USAGE_SHADER_WRITE, blender::MatBase< float, 4, 4 >::identity(), blender::eevee::LightCullingData::items_count, LIGHT_BUF_SLOT, LIGHT_CULL_BUF_SLOT, blender::eevee::LIGHT_SUN, LIGHT_TILE_BUF_SLOT, LIGHT_ZBIN_BUF_SLOT, blender::eevee::LightCullingData::local_lights_len, MEM_SAFE_FREE, blender::math::projection::orthographic(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::Texture::read(), result, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), SHADOW_PAGE_PER_ROW, blender::eevee::shadow_sampling_tile_pack(), blender::eevee::shadow_sampling_tile_unpack(), SHADOW_TILEMAP_PER_ROW, SHADOW_TILEMAP_RES, blender::draw::Manager::submit(), blender::eevee::LightCullingData::sun_lights_len, test_eevee_shadow_tilemap_amend(), tile, view, x, and y.

Referenced by test_eevee_shadow_tilemap_amend().

◆ test_eevee_surfel_list()

void blender::draw::test_eevee_surfel_list ( )
static

◆ texpaint_request_active_uv()

◆ thickness_remap()

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

◆ to_blend()

◆ to_depth_test()

◆ to_face_cull_test()

GPUFaceCullTest blender::draw::to_face_cull_test ( DRWState state)
inlinestatic

◆ to_provoking_vertex()

GPUProvokingVertex blender::draw::to_provoking_vertex ( DRWState state)
inlinestatic

◆ to_stencil_op()

◆ to_stencil_test()

◆ to_write_mask()

◆ tris_count_from_number_of_loops()

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

◆ update_loose_flags()

◆ update_loose_normals()

◆ use_normals_simplify()

bool blender::draw::use_normals_simplify ( const Scene & scene,
const MeshRenderData & mr )
static

The mesh normals access functions can end up mixing face corner normals calculated with the costly tangent space method. The "Simplify Normals" option is supposed to avoid that, but not the "Free" normals which are actually cheaper than calculating true normals.

Definition at line 84 of file draw_cache_extract_mesh.cc.

References Geometry::attributes, blender::bke::Corner, blender::bke::Int16_2D, blender::draw::MeshRenderData::mesh, RenderData::mode, Scene::r, R_SIMPLIFY, and R_SIMPLIFY_NORMALS.

Referenced by mesh_buffer_cache_create_requested().

◆ uv_from_jitter_v2()

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

Needed so we can use jitter values for face interpolation.

Definition at line 103 of file extract_mesh_vbo_mesh_analysis.cc.

References clamp_v2().

Referenced by statvis_calc_thickness().

◆ v2_to_short_angle()

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

Definition at line 52 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()

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

Definition at line 35 of file draw_cache_impl_lattice.cc.

References v, and w().

Referenced by lattice_render_verts_len_get().

◆ vertbuf_data_extract_direct()

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

◆ volume_batch_cache_clear()

◆ volume_batch_cache_get()

◆ volume_batch_cache_init()

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

◆ volume_batch_cache_valid()

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

◆ volume_grid_cache_get()

◆ volume_object_grids_init()

◆ volume_sub_pass()

PassSimple::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 278 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 113 of file draw_volume.cc.

References DRWContext::data, drw_get(), module, and DRWData::volume_module.

Referenced by volume_sub_pass_implementation().

Variable Documentation

◆ drw_debug_persistent_lifetime

uint blender::draw::drw_debug_persistent_lifetime = ~0u
constexpr

Definition at line 41 of file draw_debug.hh.

◆ g_subdiv_eval_mutex

Mutex blender::draw::g_subdiv_eval_mutex
static

◆ g_subdiv_evaluator_cache

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

The evaluators are owned by the OpenSubdiv_EvaluatorCache which is being referenced by bke::subdiv::Subdiv->evaluator. So the evaluator cache cannot be freed until all references are gone. The user counting allows to free the evaluator when there is no more subdiv.

Definition at line 1585 of file draw_cache_impl_subdivision.cc.

Referenced by draw_subdiv_create_requested_buffers(), and DRW_cache_free_old_subdiv().

◆ g_subdiv_evaluator_users

uint64_t blender::draw::g_subdiv_evaluator_users = 0
static

◆ gpu_subdiv_free_queue

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

The #bke::subdiv::Subdiv data is being owned the modifier. Since the modifier can be freed from any thread (e.g. from depsgraph multi-threaded update) which may not have a valid #GPUContext active, we move the data to discard to this free list until a code-path with a active GPUContext is hit. This is kind of garbage collection.

Definition at line 1760 of file draw_cache_impl_subdivision.cc.

Referenced by DRW_cache_free_old_subdiv(), and DRW_subdiv_cache_free().

◆ gpu_subdiv_queue_mutex

blender::Mutex blender::draw::gpu_subdiv_queue_mutex
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 224 of file draw_cache_impl_pointcloud.cc.

Referenced by pointcloud_extract_indices().