Blender V5.3
blender::draw Namespace Reference

Namespaces

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

Classes

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

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 = 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 class  GSplatEvalShader { Ellipses , Radiance , EllipsesRadiance }
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, 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)
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)
DRWVolumeGrid * DRW_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::VertBuf * DRW_cache_grease_pencil_position_buffer_get (const Scene *scene, Object *ob)
gpu::VertBuf * DRW_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)
 BLI_STATIC_ASSERT (MBC_BATCH_LEN< 64, "Number of batches exceeded the limit of bit fields")
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 (ListBaseT< Nurb > *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 ListBaseT< Nurb > *lb, const CurveCache *ob_curve_cache)
static CurveRenderData * curve_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 CurveBatchCache * curve_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 CurvesBatchCache & get_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_radius (const bke::CurvesGeometry &curves, const OffsetIndices< int > points_by_curve, const IndexMask &bezier_curves, const OffsetIndices< int > bezier_offsets, 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< StringRef > get_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])
CurvesEvalCache & curves_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 LatticeRenderData * lattice_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 BPoint * lattice_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 LatticeBatchCache * lattice_batch_cache_get (Lattice *lt)
static gpu::VertBuf * lattice_batch_cache_get_pos (LatticeRenderData *rdata, LatticeBatchCache *cache, bool use_weight, const int actdef)
static gpu::IndexBuf * lattice_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 GPUVertFormat * edit_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 ParticleBatchCache * particle_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< StringRef > get_first_uv_name (const bke::AttributeAccessor &attributes)
template<typename T>
Span< T > span_from_custom_data_layer (const Mesh &mesh, const eCustomDataType type, const StringRef name)
template<typename T>
Span< T > span_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)
CurvesEvalCache & hair_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 *vert_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 VolumeBatchCache * volume_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 DRWVolumeGrid * volume_grid_cache_get (const Volume *volume, const bke::VolumeGridData *grid, VolumeBatchCache *cache)
void hair_init ()
gpu::VertBuf * hair_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::VertBuf * curves_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, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, GPUMaterial *gpu_material=nullptr)
gpu::Batch * gsplat_sub_pass_setup (PassMain::Sub &sub_ps, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, 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_gsplat_init (DRWData *drw_data=nullptr)
void DRW_gsplat_begin_sync ()
void DRW_gsplat_module_free (draw::GSplatModule *module)
void DRW_gsplat_ensure_ellipses (draw::Manager &manager, draw::View &view)
void DRW_gsplat_ensure_radiance (draw::Manager &manager, draw::View &view)
void DRW_gsplat_ensure_ellipses_radiance (draw::Manager &manager, draw::View &view)
bool pointcloud_is_gsplat (Object *ob)
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, const DRWContext &draw_ctx)
 ENUM_OPERATORS (InstancesFlags)
static void foreach_obref_in_scene (DRWContext &draw_ctx, FunctionRef< DrawFilter(Object &, const DupliObject *dupli)> 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< StringRef > get_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>
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, const ObjectRef &ob_ref, const ResourceHandleRange &res_handle, GPUMaterial *gpu_material)
static Vector< SculptBatch > sculpt_batches_get_ex (const Object *ob, const bool use_wire, const Span< pbvh::AttributeRequest > attrs)
Vector< SculptBatch > sculpt_batches_get (const Object *ob, SculptBatchFeature features)
Vector< SculptBatch > sculpt_batches_per_material_get (const Object *ob, Span< const GPUMaterial * > materials)
 ENUM_OPERATORS (SculptBatchFeature)
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 IndexMask &loose_edges, MutableSpan< T > gpu_data)
gpu::VertBufPtr extract_positions (const MeshRenderData &mr, MeshBufferCache &cache)
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, MeshBufferCache &cache, 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, MeshBufferCache &cache)
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 &batch_cache, MeshBufferCache &cache)
gpu::VertBufPtr extract_weights_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &batch_cache, MeshBufferCache &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, MeshBufferCache &cache)
gpu::VertBufPtr extract_paint_overlay_flags (const MeshRenderData &mr)
gpu::VertBufPtr extract_paint_overlay_flags_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
template<typename GetIndex>
static gpu::VertBufPtr bm_corner_indices_create (const BMesh &bm, const GetIndex get_index)
static gpu::VertBuf & corner_verts_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
static gpu::VertBuf & corner_edges_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
static gpu::VertBuf & face_offsets_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
static void dispatch_batched (gpu::Shader *shader, const int size)
static int element_size (const gpu::VertBuf &src, const gpu::VertBuf &dst)
static void gather_to_corner_gpu (const MeshRenderData &mr, gpu::VertBuf &src, gpu::VertBuf &indices, gpu::VertBuf &dst)
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::VertBuf * build_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 GPUVertFormat & get_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 GPUVertFormat & get_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 GPUVertFormat & get_fdots_pos_format ()
static const GPUVertFormat & get_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)
static Span< float3 > get_vert_normals (const MeshRenderData &mr)
template<typename GPUType>
static void extract_vert_normals_mesh (const MeshRenderData &mr, MutableSpan< GPUType > vert_data)
template<typename GPUType>
static void extract_vert_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > vert_data)
template<typename GPUType>
static void extract_face_normals_mesh (const MeshRenderData &mr, MutableSpan< GPUType > face_data)
template<typename GPUType>
static void extract_face_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > face_data)
template<typename GPUType>
static void extract_corner_normals_mesh (const MeshRenderData &mr, MutableSpan< GPUType > normals)
template<typename GPUType>
static void extract_corner_normals_bm (const MeshRenderData &mr, MutableSpan< GPUType > normals)
template<typename GPUType>
static gpu::VertBufPtr extract_normals (const MeshRenderData &mr, MeshBufferCache &cache, const GPUVertFormat &format)
static const GPUVertFormat & get_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 GPUVertFormat & get_paint_overlay_flag_format ()
static void update_loose_flags (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &flags)
static void extract_vert_positions_mesh (const MeshRenderData &mr, MutableSpan< float3 > vert_data, MutableSpan< float3 > loose_data)
static void extract_vert_positions_bm (const MeshRenderData &mr, MutableSpan< float3 > vert_data, MutableSpan< float3 > loose_data)
static void extract_loose_positions_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &vbo)
static const GPUVertFormat & get_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 GPUVertFormat & get_coarse_tan_format ()
static VectorSet< StringRef > mesh_extract_uv_format_init (GPUVertFormat *format, const MeshBatchCache &cache, const Mesh &mesh, const MeshExtractType extract_type)
static VectorSet< StringRef > all_uv_map_attributes (const Mesh &mesh)
static void extract_vert_normals_mesh (const MeshRenderData &mr, MutableSpan< int1010102_norm > vert_data, MutableSpan< int1010102_norm > loose_data)
static void extract_vert_normals_bm (const MeshRenderData &mr, MutableSpan< int1010102_norm > vert_data, MutableSpan< int1010102_norm > loose_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)
gpu::BottomLevelAS * DRW_cache_object_surface_blas_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::BottomLevelAS * DRW_cache_mesh_surface_blas_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)
gpu::Batch * DRW_curve_batch_cache_get_wire_edge (Curve *cu)
gpu::Batch * DRW_curve_batch_cache_get_wire_edge_viewer_attribute (Curve *cu)
gpu::Batch * DRW_curve_batch_cache_get_normal_edge (Curve *cu)
gpu::Batch * DRW_curve_batch_cache_get_edit_edges (Curve *cu)
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)
gpu::Batch * DRW_lattice_batch_cache_get_all_edges (Lattice *lt, bool use_weight, int actdef)
gpu::Batch * DRW_lattice_batch_cache_get_all_verts (Lattice *lt)
gpu::Batch * DRW_lattice_batch_cache_get_edit_verts (Lattice *lt)
PointCloud
gpu::Batch * DRW_cache_pointcloud_vert_overlay_get (Object *ob)
gpu::VertBuf * DRW_pointcloud_position_and_radius_buffer_get (Object *ob)
gpu::VertBuf ** DRW_pointcloud_evaluated_attribute (PointCloud *pointcloud, StringRef name)
gpu::Batch * DRW_pointcloud_batch_cache_get_dots (Object *ob)
gpu::Batch * DRW_pointcloud_batch_cache_get_edit_dots (Object *ob)
void DRW_pointcloud_batch_cache_create_requested (Object *ob)
GSplat
gpu::Batch * DRW_cache_gsplat_vert_overlay_get (Object *ob)
gpu::VertBuf ** DRW_gsplat_evaluated_attribute (PointCloud *pointcloud, StringRef name)
gpu::Batch * DRW_gsplat_batch_cache_get_dots (Object *ob)
gpu::Batch * DRW_gsplat_batch_cache_get_edit_dots (Object *ob)
void DRW_gsplat_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)
gpu::Batch * DRW_volume_batch_cache_get_wireframes_face (Volume *volume)
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)
gpu::Batch * DRW_particles_batch_cache_get_hair (Object *object, ParticleSystem *psys, ModifierData *md)
gpu::Batch * DRW_particles_batch_cache_get_dots (Object *object, ParticleSystem *psys)
gpu::Batch * DRW_particles_batch_cache_get_edit_strands (Object *object, ParticleSystem *psys, PTCacheEdit *edit, bool use_weight)
gpu::Batch * DRW_particles_batch_cache_get_edit_inner_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
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)
Dependency Data
static void ensure_dependency_data (MeshRenderData &mr, Span< IBOType > ibo_requests, Span< VBOType > vbo_requests, MeshBufferCache &cache)
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 SortedFaceData & mesh_render_data_faces_sorted_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
Mesh/BMesh Interface (indirect, partially cached access to complex data).
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)
static const Mesh * mesh_get_original_mesh (const Object &object)
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 (draw::MeshBatchCache *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_gsplat_batch_cache_dirty_tag (PointCloud *pointcloud, int mode)
void DRW_gsplat_batch_cache_validate (PointCloud *pointcloud)
void DRW_gsplat_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)
void DRW_gsplat_batch_cache_free_old (PointCloud *pointcloud, int ctime)
Curves
gpu::VertBufPtr & DRW_curves_texture_for_evaluated_attribute (Curves *curves, StringRef name, bool &r_is_point_domain, bool &r_valid_attribute)
gpu::Batch * DRW_curves_batch_cache_get_edit_points (Curves *curves)
gpu::Batch * DRW_curves_batch_cache_get_sculpt_curves_cage (Curves *curves)
gpu::Batch * DRW_curves_batch_cache_get_edit_curves_handles (Curves *curves)
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)
gpu::Batch * DRW_mesh_batch_cache_get_all_verts (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_paint_overlay_verts (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_all_edges (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_loose_edges (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edge_detection (Mesh &mesh, bool *r_is_manifold)
gpu::Batch * DRW_mesh_batch_cache_get_surface (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_paint_overlay_surface (Mesh &mesh)
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)
gpu::Batch * DRW_mesh_batch_cache_get_surface_texpaint_single (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_surface_vertpaint (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_surface_sculpt (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_surface_weights (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_sculpt_overlays (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_surface_viewer_attribute (Mesh &mesh)
gpu::BottomLevelAS * DRW_mesh_batch_cache_get_surface_blas (Mesh &mesh)
Edit-Mesh Drawing
gpu::Batch * DRW_mesh_batch_cache_get_edit_triangles (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edit_vertices (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edit_edges (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edit_vert_normals (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edit_loop_normals (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edit_facedots (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edit_skin_roots (Mesh &mesh)
Edit-mesh Selection
gpu::Batch * DRW_mesh_batch_cache_get_triangles_with_select_id (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_facedots_with_select_id (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edges_with_select_id (Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_verts_with_select_id (Mesh &mesh)
Object Mode Wireframe Overlays
gpu::Batch * DRW_mesh_batch_cache_get_wireframes_face (Mesh &mesh)
Edit-mesh UV Editor
gpu::Batch * DRW_mesh_batch_cache_get_edituv_faces_stretch_area (Object &object, Mesh &mesh, float **tot_area, float **tot_uv_area)
gpu::Batch * DRW_mesh_batch_cache_get_edituv_faces_stretch_angle (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edituv_faces (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edituv_wireframe (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edituv_edges (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edituv_verts (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_edituv_facedots (Object &object, Mesh &mesh)
For Image UV Editor
gpu::Batch * DRW_mesh_batch_cache_get_uv_faces (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_all_uv_wireframe (Object &object, Mesh &mesh)
gpu::Batch * DRW_mesh_batch_cache_get_uv_wireframe (Object &object, Mesh &mesh)
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 GPUVertFormat * grease_pencil_stroke_format ()
static const GPUVertFormat * grease_pencil_color_format ()
static const GPUVertFormat & get_origindex_format ()
Internal Utilities
static bool grease_pencil_batch_cache_valid (const GreasePencil &grease_pencil)
static GreasePencilBatchCache * grease_pencil_batch_cache_init (GreasePencil &grease_pencil)
static void grease_pencil_batch_cache_clear (GreasePencil &grease_pencil)
static GreasePencilBatchCache * grease_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 IndexMask grease_pencil_get_editable_non_nurbs_curves (Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, IndexMaskMemory &memory)
static IndexMask grease_pencil_get_visible_non_nurbs_curves (Object &object, const bke::greasepencil::Drawing &drawing, IndexMaskMemory &memory)
static void index_buf_add_line_points (const bke::greasepencil::Drawing &drawing, const IndexMask &curves_mask, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void index_buf_add_points (const bke::greasepencil::Drawing &drawing, const IndexMask &curves_mask, MutableSpan< uint > points_data, int *r_drawing_point_index, int *r_drawing_start_offset)
static IndexMask grease_pencil_get_editable_selected_nurbs_curves (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 void grease_pencil_cache_add_nurbs (const bke::greasepencil::Drawing &drawing, const IndexMask &nurbs_curves, 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_nurbs_lines (const bke::greasepencil::Drawing &drawing, const IndexMask &nurbs_curves, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void grease_pencil_weight_batch_ensure (Object &object, const GreasePencil &grease_pencil, const Scene &scene)
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, const int *r_drawing_line_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< T > attribute_interpolate (const VArray< T > &input, const bke::CurvesGeometry &curves)
static VArray< float > interpolate_corners (const bke::CurvesGeometry &curves)
static float segment_radius_length (const float l, const float r1, const float r2)
static Array< float > get_radii_lengths (const Span< float > lengths, const VArray< float > &radii, const IndexRange &points)
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 void mesh_cd_layers_type_merge (DRW_MeshCDMask *a, const DRW_MeshCDMask &b)
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 bool attribute_exists (const Mesh &mesh, const StringRef name)
static std::optional< bke::AttributeMetaData > lookup_meta_data (const Mesh &mesh, const StringRef name)
static void mesh_cd_calc_used_gpu_layers (const Object &object, const Mesh &mesh, const Span< const GPUMaterial * > materials, VectorSet< std::string > *r_attributes, DRW_MeshCDMask *r_cd_used)
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 MeshBatchCache * mesh_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_request_surface_blas (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 PointCloudBatchCache * pointcloud_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)
PointCloud extraction
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)
Private API
gpu::VertBuf * pointcloud_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::VertBuf * draw_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::VertBuf * draw_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 DRWSubdivCache & mesh_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::Sub * volume_sub_pass (PassMain::Sub &ps, Scene *scene, Object *ob, GPUMaterial *gpu_material)
template<typename PassType>
PassType * volume_world_grids_init (PassType &ps, ListBaseWrapper< GPUMaterialAttribute > &attrs)
template<typename PassType>
PassType * volume_object_grids_init (PassType &ps, Object *ob, ListBaseWrapper< GPUMaterialAttribute > &attrs)
template<typename PassType>
PassType * drw_volume_object_mesh_init (PassType &ps, Scene *scene, Object *ob, ListBaseWrapper< GPUMaterialAttribute > &attrs)
template<typename PassType>
PassType * volume_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< float3 > precompute_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 Image * as_image (gpu::Texture *tex)
static Image ** as_image (gpu::Texture **tex)
static gpu::Texture * as_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)
Copy to Face Corners on the GPU

Vertex, edge, and face data is copied to face corners on the GPU to reduce the size of data uploads. For example, on a typical quad mesh there are four times as many corners as faces and vertices. Topology data used for the copy (see #MeshBufferCache::corner_verts, etc.) is only uploaded once and is shared by all buffers.

In each function, src has a value for every element of the source domain, and dst is a device-only buffer with the same format and a value for every face corner, optionally followed by values for loose geometry. These GPU tasks can only be submitted from the thread with the GPU context.

void gather_vert_to_corner_gpu (const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
void gather_edge_to_corner_gpu (const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
void scatter_face_to_corner_gpu (const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
template<typename T>
void loose_data_upload (const MeshRenderData &mr, const Span< T > loose_data, gpu::VertBuf &dst)
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 GPUVertFormat & edituv_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, MeshBufferCache &cache, StringRef name)
gpu::VertBufPtr extract_attribute_subdiv (const MeshRenderData &mr, MeshBufferCache &cache, const DRWSubdivCache &subdiv_cache, StringRef name)
gpu::VertBufPtr extract_attr_viewer (const MeshRenderData &mr, MeshBufferCache &cache)
static GPUVertFormat attribute_vbo_format (const MeshRenderData &mr, const StringRef name, const bke::AttrType type)
static gpu::VertBufPtr vbo_create (const GPUVertFormat &format, const int size)
static int domain_size (const MeshRenderData &mr, const bke::AttrDomain domain)
static gpu::VertBufPtr copy_to_corners_gpu (const MeshRenderData &mr, MeshBufferCache &cache, const bke::AttrDomain domain, gpu::VertBuf &src, const GPUVertFormat &format)
static void extract_data_bmesh (const MeshRenderData &mr, const BMDataLayerLookup &attr, gpu::VertBuf &vbo)
static gpu::VertBufPtr extract_attribute_data (const MeshRenderData &mr, MeshBufferCache &cache, const BMDataLayerLookup &attr, const GPUVertFormat &format)
static gpu::VertBufPtr extract_attribute_data (const MeshRenderData &mr, MeshBufferCache &cache, const bke::GAttributeReader &attr, const GPUVertFormat &format)

Variables

constexpr uint32_t radiance_degs_max = 3
constexpr uint32_t radiance_coeffs_max = (radiance_degs_max + 1u) * (radiance_degs_max + 1u)
constexpr float value_scale_default = 1e-2f
constexpr float value_opacity_default = 0.5f
static OpenSubdiv_EvaluatorCache * g_subdiv_evaluator_cache = nullptr
static uint64_t g_subdiv_evaluator_users = 0
static Mutex g_subdiv_eval_mutex
static LinkNode * gpu_subdiv_free_queue = nullptr
static Mutex gpu_subdiv_queue_mutex
constexpr uint drw_debug_persistent_lifetime = ~0u
static constexpr uint64_t LIGHT_LINK_MASK_ALL = ~uint64_t(0)

Mesh Render Data

enum class  MeshExtractType { BMesh , Mesh }
const Mesh & editmesh_final_or_this (const Object &object, const Mesh &mesh)
BLI_INLINE BMFace * bm_original_face_get (const MeshRenderData &mr, int idx)
BLI_INLINE BMEdge * bm_original_edge_get (const MeshRenderData &mr, int idx)
BLI_INLINE BMVert * bm_original_vert_get (const MeshRenderData &mr, int idx)
BLI_INLINE const float * bm_vert_co_get (const MeshRenderData &mr, const BMVert *eve)
BLI_INLINE const float * bm_vert_no_get (const MeshRenderData &mr, const BMVert *eve)
BLI_INLINE const float * bm_face_no_get (const MeshRenderData &mr, const BMFace *efa)

Typedef Documentation

◆ CurvesInfosBuf

◆ DispatchIndirectBuf

◆ DrawIndirectBuf

◆ ObjectBoundsBuf

◆ ObjectInfosBuf

Definition at line 34 of file draw_view.hh.

◆ PassMain

◆ PassSimple

◆ ShadowPageCacheBuf

Definition at line 25 of file eevee_test.cc.

◆ 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 313 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 180 of file draw_cache_impl_curve.cc.

◆ 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
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 327 of file draw_cache_impl.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
DRW_MESH_WEIGHT_STATE_MULTIPAINT 
DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE 
DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE 

Definition at line 60 of file draw_cache_extract.hh.

◆ CurvesEvalShader

Enumerator
CURVES_EVAL_POSITION 
CURVES_EVAL_FLOAT 
CURVES_EVAL_FLOAT2 
CURVES_EVAL_FLOAT3 
CURVES_EVAL_FLOAT4 
CURVES_EVAL_LENGTH_INTERCEPT 

Definition at line 46 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 200 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 38 of file draw_cache.hh.

◆ GSplatEvalShader

Compute passes are categorized. Some renderers only require projection of gaussians, while others also require some or all of the spherical harmonics to be evaluated.

Enumerator
Ellipses 
Radiance 
EllipsesRadiance 

Definition at line 37 of file draw_gsplat_private.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 125 of file draw_cache_extract.hh.

◆ InstancesFlags

Enumerator
IsNegativeScale 

Definition at line 760 of file draw_context.cc.

◆ MeshExtractType

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

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

◆ UvExtractionMode

Enumerator
Edit 
Selection 
All 

Definition at line 410 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 75 of file draw_cache_extract.hh.

Function Documentation

◆ accumululate_material_counts_bm()

◆ accumululate_material_counts_mesh()

◆ all_uv_map_attributes()

◆ alloc_evaluated_point_attribute_vbo()

◆ 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 area_ratio_get(), BLI_INLINE, and FLT_EPSILON.

Referenced by area_ratio_get().

◆ 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 area_ratio_to_stretch(), and BLI_INLINE.

Referenced by area_ratio_to_stretch().

◆ as_image() [1/2]

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

Definition at line 1314 of file DRW_gpu_wrapper.hh.

References as_image().

◆ as_image() [2/2]

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

Definition at line 1309 of file DRW_gpu_wrapper.hh.

References as_image().

Referenced by as_image(), and as_image().

◆ as_texture() [1/2]

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

Definition at line 1324 of file DRW_gpu_wrapper.hh.

References as_texture().

◆ as_texture() [2/2]

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

Definition at line 1319 of file DRW_gpu_wrapper.hh.

References as_texture().

Referenced by as_texture(), and as_texture().

◆ attribute_exists()

bool blender::draw::attribute_exists ( const Mesh & mesh,
const StringRef name )
static

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

◆ attribute_vbo_format()

◆ axis_from_enum_v3()

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

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

◆ BLI_STATIC_ASSERT()

◆ bm_corner_indices_create()

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

◆ bm_original_face_get()

◆ bm_original_vert_get()

◆ bm_vert_co_get()

◆ bm_vert_no_get()

◆ bmesh_normals_domain()

◆ bpoint_vflag_get()

◆ build_bmesh_face_offsets()

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

◆ 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

◆ copy_to_corners_gpu()

gpu::VertBufPtr blender::draw::copy_to_corners_gpu ( const MeshRenderData & mr,
MeshBufferCache & cache,
const bke::AttrDomain domain,
gpu::VertBuf & src,
const GPUVertFormat & format )
static

Copy values from vertices, edges, or faces to face corners on the GPU.

Parameters
srcA value for every element in domain, with the given format.

Definition at line 78 of file extract_mesh_vbo_attributes.cc.

References BLI_assert_unreachable, copy_to_corners_gpu(), blender::draw::MeshRenderData::corners_num, blender::bke::Edge, blender::bke::Face, gather_edge_to_corner_gpu(), gather_vert_to_corner_gpu(), blender::GPU_vertbuf_create_on_device(), blender::bke::Point, and scatter_face_to_corner_gpu().

Referenced by copy_to_corners_gpu(), and extract_attribute_data().

◆ corner_edges_ensure()

◆ corner_verts_ensure()

◆ count_cache_segment_keys()

◆ create_edit_points_data()

◆ create_edit_points_position()

◆ create_edit_points_position_vbo()

◆ create_edit_points_radius()

◆ create_edit_points_selection()

◆ create_lines_for_remaining_edges()

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

◆ 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 418 of file draw_cache_impl_curve.cc.

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

Referenced by curve_batch_cache_clear(), DRW_curve_batch_cache_free(), and DRW_curve_batch_cache_validate().

◆ curve_batch_cache_get()

◆ curve_batch_cache_init()

◆ curve_batch_cache_valid()

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

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

◆ curve_render_data_create()

◆ curve_render_data_free()

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

◆ curve_render_data_normal_len_get()

◆ curve_render_data_overlay_edges_len_get()

◆ curve_render_data_overlay_verts_len_get()

◆ curve_render_data_wire_curve_len_get()

◆ curve_render_data_wire_edges_len_get()

◆ curve_render_data_wire_verts_len_get()

◆ curve_render_normal_len_get()

int blender::draw::curve_render_normal_len_get ( const ListBaseT< Nurb > * lb,
const CurveCache * ob_curve_cache )
static

◆ curve_render_overlay_verts_edges_len_get()

void blender::draw::curve_render_overlay_verts_edges_len_get ( ListBaseT< Nurb > * lb,
int * r_vert_len,
int * r_edge_len )
static

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

◆ curves_pos_buffer_get()

◆ curves_sub_pass_setup()

◆ curves_sub_pass_setup_implementation()

◆ discard_buffers()

◆ dispatch_batched()

◆ distort_remap()

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

Definition at line 357 of file extract_mesh_vbo_mesh_analysis.cc.

References BLI_INLINE, CLAMP, distort_remap(), and min.

Referenced by distort_remap(), and statvis_calc_distort().

◆ domain_size()

◆ 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 1253 of file draw_cache_impl_subdivision.cc.

References blender::opensubdiv::EvalOutputAPI::create_patch_arrays_buf(), draw_subdiv_build_fdots_buffers(), draw_subdiv_cache_need_face_data(), blender::DRW_shader_subdiv_get(), drw_subdiv_compute_dispatch(), OpenSubdiv_Evaluator::eval_output, 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(), blender::GPU_BARRIER_ELEMENT_ARRAY, blender::GPU_BARRIER_VERTEX_ATTRIB_ARRAY, blender::GPU_indexbuf_bind_as_ssbo(), blender::GPU_memory_barrier(), blender::draw::DRWSubdivCache::gpu_patch_map, blender::GPU_shader_bind(), blender::GPU_shader_unbind(), blender::GPU_storagebuf_bind(), blender::GPU_storagebuf_free(), blender::GPU_vertbuf_bind_as_ssbo(), blender::draw::DRWSubdivCache::num_coarse_faces, PATCH_EVALUATION_EXTRA_COARSE_FACE_DATA_BUF_SLOT, blender::PATCH_EVALUATION_FACE_DOTS, blender::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 draw_subdiv_build_fdots_buffers(), and 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]

◆ 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 1519 of file draw_cache_impl_subdivision.cc.

References blender::Array< T, InlineBufferCapacity, Allocator >::data(), draw_subdiv_build_origindex_buffer(), draw_subdiv_cache_ensure_mat_offsets(), draw_subdiv_cache_free_material_data(), blender::bke::Face, blender::draw::DRWSubdivCache::face_mat_offset, blender::Mesh::faces_num, blender::bke::AttributeAccessor::lookup_or_default(), blender::draw::DRWSubdivCache::mat_end, blender::draw::DRWSubdivCache::mat_start, blender::MEM_new_array_uninitialized(), blender::MEM_new_array_zeroed(), blender::MEM_new_zeroed(), blender::draw::DRWSubdivCache::num_subdiv_loops, and blender::draw::DRWSubdivCache::subdiv_face_offset.

Referenced by draw_subdiv_cache_ensure_mat_offsets(), and draw_subdiv_create_requested_buffers().

◆ draw_subdiv_cache_extra_coarse_face_data_bm()

◆ 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 1596 of file draw_cache_impl_subdivision.cc.

References blender::BKE_editmesh_bmesh_get_for_write(), blender::BKE_object_get_editmesh_eval_final(), blender::BKE_subsurf_modifier_subdiv_descriptor_ensure(), blender::BLI_assert(), blender::bm, blender::draw::DRWSubdivCache::bm, blender::Span< T >::contains(), draw_subdiv_cache_ensure_mat_offsets(), draw_subdiv_cache_update_extra_coarse_face_data(), draw_subdiv_create_requested_buffers(), blender::draw::MeshRenderData::edit_bmesh, blender::bke::subdiv::eval_begin_from_mesh(), blender::Mesh::faces_num, g_subdiv_eval_mutex, g_subdiv_evaluator_cache, g_subdiv_evaluator_users, blender::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, blender::SubsurfRuntimeData::settings, blender::SubsurfRuntimeData::stats_faces_num, blender::SubsurfRuntimeData::stats_totedge, blender::SubsurfRuntimeData::stats_totloop, blender::SubsurfRuntimeData::stats_totvert, blender::draw::DRWSubdivCache::subdiv, blender::bke::subdiv::SUBDIV_EVALUATOR_TYPE_GPU, blender::SubsurfRuntimeData::subdiv_gpu, Tris, tris_count_from_number_of_loops(), blender::draw::DRWSubdivCache::use_custom_loop_normals, blender::draw::DRWSubdivCache::use_hide, blender::SubsurfRuntimeData::use_loop_normals, and blender::SubsurfRuntimeData::use_optimal_display.

Referenced by draw_subdiv_create_requested_buffers(), and 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 985 of file draw_cache_impl_subdivision.cc.

References blender::opensubdiv::EvalOutputAPI::create_patch_arrays_buf(), draw_subdiv_cache_need_face_data(), draw_subdiv_extract_pos(), blender::DRW_shader_subdiv_get(), drw_subdiv_compute_dispatch(), OpenSubdiv_Evaluator::eval_output, 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(), blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_BARRIER_VERTEX_ATTRIB_ARRAY, blender::GPU_memory_barrier(), blender::draw::DRWSubdivCache::gpu_patch_map, blender::GPU_shader_bind(), blender::GPU_shader_unbind(), blender::GPU_storagebuf_bind(), blender::GPU_storagebuf_free(), blender::GPU_vertbuf_bind_as_ssbo(), blender::draw::DRWSubdivCache::num_subdiv_quads, blender::draw::DRWSubdivCache::patch_coords, blender::PATCH_EVALUATION, PATCH_EVALUATION_INPUT_PATCH_HANDLES_BUF_SLOT, blender::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, blender::draw::DRWSubdivCache::subdiv, and UNUSED_VARS.

Referenced by draw_subdiv_extract_pos(), 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 1042 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(), draw_subdiv_extract_uvs(), blender::DRW_shader_subdiv_get(), drw_subdiv_compute_dispatch(), OpenSubdiv_Evaluator::eval_output, 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(), blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_BARRIER_VERTEX_ATTRIB_ARRAY, blender::GPU_memory_barrier(), blender::draw::DRWSubdivCache::gpu_patch_map, blender::GPU_shader_bind(), blender::GPU_shader_unbind(), blender::GPU_storagebuf_bind(), blender::GPU_storagebuf_free(), blender::GPU_vertbuf_bind_as_ssbo(), blender::draw::DRWSubdivCache::num_subdiv_quads, blender::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 draw_subdiv_extract_uvs(), and extract_uv_maps_subdiv().

◆ draw_subdiv_free_edit_mode_cache()

◆ draw_subdiv_init_origindex_buffer() [1/2]

◆ draw_subdiv_init_origindex_buffer() [2/2]

◆ 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

Definition at line 878 of file draw_cache_impl_subdivision.cc.

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

Referenced by draw_subdiv_init_ubo_storage(), and draw_subdiv_ubo_update_and_bind().

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

◆ drw_batch_cache_generate_requested_evaluated_mesh_or_curve()

◆ drw_batch_cache_validate()

◆ DRW_cache_curve_edge_normal_get()

◆ DRW_cache_curve_edge_overlay_get()

◆ DRW_cache_curve_edge_wire_get()

◆ DRW_cache_curve_edge_wire_viewer_attribute_get()

◆ DRW_cache_curve_vert_overlay_get()

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

◆ DRW_cache_lattice_vert_overlay_get()

◆ DRW_cache_lattice_verts_get()

◆ DRW_cache_lattice_wire_get()

◆ DRW_cache_mesh_all_edges_get()

◆ DRW_cache_mesh_all_verts_get()

◆ DRW_cache_mesh_edge_detection_get()

◆ DRW_cache_mesh_face_wireframe_get()

◆ DRW_cache_mesh_loose_edges_get()

◆ DRW_cache_mesh_paint_overlay_edges_get()

◆ DRW_cache_mesh_paint_overlay_surface_get()

◆ DRW_cache_mesh_paint_overlay_verts_get()

◆ DRW_cache_mesh_surface_blas_get()

◆ DRW_cache_mesh_surface_get()

◆ DRW_cache_mesh_surface_mesh_analysis_get()

◆ DRW_cache_mesh_surface_sculptcolors_get()

◆ DRW_cache_mesh_surface_shaded_get() [1/2]

◆ DRW_cache_mesh_surface_shaded_get() [2/2]

◆ DRW_cache_mesh_surface_texpaint_get()

◆ DRW_cache_mesh_surface_texpaint_single_get()

◆ DRW_cache_mesh_surface_vertpaint_get()

◆ DRW_cache_mesh_surface_viewer_attribute_get()

◆ DRW_cache_mesh_surface_weights_get()

◆ DRW_cache_object_all_edges_get()

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

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

◆ DRW_cache_object_surface_blas_get()

◆ DRW_cache_object_surface_get()

◆ DRW_cache_object_surface_material_get() [1/2]

◆ DRW_cache_object_surface_material_get() [2/2]

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

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

◆ DRW_cache_particles_get_hair()

◆ DRW_cache_pointcloud_vert_overlay_get()

◆ DRW_cache_surf_edge_wire_get()

◆ DRW_cache_text_edge_wire_get()

◆ DRW_cache_volume_face_wireframe_get()

◆ DRW_cache_volume_selection_surface_get()

◆ DRW_cdlayer_attr_aliases_add()

void blender::draw::DRW_cdlayer_attr_aliases_add ( GPUVertFormat * format,
const char * base_name,
bke::AttrType data_type,
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()

◆ DRW_curve_batch_cache_dirty_tag()

◆ DRW_curve_batch_cache_free()

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

◆ DRW_curve_batch_cache_get_edit_edges()

◆ DRW_curve_batch_cache_get_edit_verts()

◆ DRW_curve_batch_cache_get_normal_edge()

◆ DRW_curve_batch_cache_get_wire_edge()

◆ DRW_curve_batch_cache_get_wire_edge_viewer_attribute()

◆ DRW_curve_batch_cache_validate()

◆ DRW_curves_batch_cache_create_requested()

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

Definition at line 1081 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_radius(), create_edit_points_selection(), create_lines_ibo_no_cyclic(), create_lines_ibo_with_cyclic(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::bke::CurvesGeometry::curve_type_counts(), blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::DEG_get_original(), blender::DRW_batch_requested(), DRW_curves_batch_cache_create_requested(), blender::DRW_ibo_request(), blender::DRW_ibo_requested(), blender::DRW_object_get_data_for_drawing(), blender::DRW_vbo_request(), blender::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_rad, blender::draw::CurvesBatchCache::edit_points_selection, blender::bke::CurvesGeometry::evaluated_points_by_curve(), blender::offset_indices::gather_selected_offsets(), get_batch_cache(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_PRIM_LINES, blender::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(), and DRW_curves_batch_cache_create_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)

◆ DRW_curves_batch_cache_free_old()

◆ DRW_curves_batch_cache_get_edit_curves_handles()

◆ DRW_curves_batch_cache_get_edit_curves_lines()

◆ DRW_curves_batch_cache_get_edit_points()

◆ DRW_curves_batch_cache_get_sculpt_curves_cage()

◆ DRW_curves_batch_cache_validate()

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

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

◆ DRW_curves_module_free()

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

Definition at line 87 of file draw_curves.cc.

References DRW_curves_module_free().

Referenced by DRW_curves_module_free(), and blender::DRW_viewport_data_free().

◆ DRW_curves_texture_for_evaluated_attribute()

◆ DRW_curves_update()

◆ 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 80 of file draw_debug.cc.

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

Referenced by drw_debug_clear(), and 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 91 of file draw_debug.cc.

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

Referenced by drw_debug_line().

◆ drw_debug_matrix()

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

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

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

◆ DRW_gsplat_batch_cache_dirty_tag()

◆ DRW_gsplat_batch_cache_free()

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

◆ DRW_gsplat_batch_cache_free_old()

◆ DRW_gsplat_batch_cache_get_dots()

◆ DRW_gsplat_batch_cache_get_edit_dots()

◆ DRW_gsplat_batch_cache_validate()

◆ DRW_gsplat_begin_sync()

void blender::draw::DRW_gsplat_begin_sync ( )

◆ DRW_gsplat_ensure_ellipses()

void blender::draw::DRW_gsplat_ensure_ellipses ( draw::Manager & manager,
draw::View & view )

◆ DRW_gsplat_ensure_ellipses_radiance()

void blender::draw::DRW_gsplat_ensure_ellipses_radiance ( draw::Manager & manager,
draw::View & view )

◆ DRW_gsplat_ensure_radiance()

◆ DRW_gsplat_evaluated_attribute()

◆ DRW_gsplat_init()

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

◆ DRW_gsplat_module_free()

void blender::draw::DRW_gsplat_module_free ( draw::GSplatModule * module)

Definition at line 41 of file draw_gsplat.cc.

References DRW_gsplat_module_free().

Referenced by DRW_gsplat_module_free(), and blender::DRW_viewport_data_free().

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

◆ DRW_lattice_batch_cache_validate()

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

References blender::gpu::BottomLevelAS::add_geometry(), 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, blender::draw::MeshBatchCache::batch, blender::draw::MeshBatchCache::batch_ready, blender::draw::MeshBatchCache::batch_requested, blender::BKE_editmesh_eval_orig_map_available(), blender::BKE_object_get_editmesh_eval_final(), blender::BKE_object_get_pre_modified_mesh(), blender::BKE_subsurf_modifier_has_gpu_subdiv(), blender::BLI_assert(), blender::draw::MeshBufferCache::buff, blender::gpu::BottomLevelAS::build(), blender::draw::MeshBatchCache::cage, blender::draw::MeshBatchCache::cd_needed, blender::CD_ORCO, blender::draw::MeshBatchCache::cd_used, blender::draw::MeshBatchCache::cd_used_over_time, blender::draw::DRW_MeshCDMask::clear(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), CornerNormal, create_material_subranges(), blender::CustomData_get_layer(), drw_attributes_merge(), drw_attributes_overlap(), DRW_create_subdivision(), DRW_mesh_batch_cache_create_requested(), drw_mesh_weight_state_clear(), drw_mesh_weight_state_copy(), drw_mesh_weight_state_extract(), blender::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, 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, blender::GPU_batch_vertbuf_add(), blender::GPU_PRIM_LINES, blender::GPU_PRIM_LINES_ADJ, blender::GPU_PRIM_POINTS, blender::GPU_PRIM_TRIS, blender::draw::MeshBufferList::ibos, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), IndexEdge, IndexFace, IndexFaceDot, blender::IndexRange::IndexRange(), IndexVert, init_empty_dummy_batch(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), 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, blender::ME_EDIT_PAINT_FACE_SEL, blender::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_merge(), MeshAnalysis, blender::Object::mode, blender::OB_MESH, blender::OB_MODE_EDIT, blender::OB_MODE_TEXTURE_PAINT, blender::OB_MODE_VERTEX_PAINT, blender::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, blender::draw::DRW_MeshCDMask::sculpt_overlays, blender::draw::MeshBatchList::sculpt_overlays, SculptData, SkinRoots, blender::draw::MeshBatchList::surface, blender::draw::MeshBatchCache::surface_blas, blender::draw::MeshBatchCache::surface_blas_ready, blender::draw::MeshBatchCache::surface_blas_requested, 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, blender::Scene::toolsettings, Tris, blender::draw::MeshBatchCache::tris_per_mat, blender::Object::type, blender::bke::pbvh::update_normals_from_eval(), blender::draw::DRW_MeshCDMask::uv, blender::draw::MeshBatchCache::uv_cage, blender::draw::MeshBatchList::uv_faces, blender::ToolSettings::uv_flag, blender::UV_FLAG_SELECT_SYNC, UVLines, UVs, UVTris, blender::draw::MeshBufferList::vbos, blender::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(), drw_batch_cache_generate_requested_evaluated_mesh_or_curve(), and DRW_mesh_batch_cache_create_requested().

◆ DRW_mesh_batch_cache_dirty_tag()

◆ DRW_mesh_batch_cache_free()

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

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

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

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

References DRW_mesh_batch_cache_get_all_uv_wireframe(), 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_sculpt_overlays(), DRW_mesh_batch_cache_get_surface_blas(), 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().

Referenced by DRW_cache_mesh_surface_shaded_get(), DRW_mesh_batch_cache_get_surface_shaded(), and 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()

◆ 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

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

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

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

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

◆ DRW_pointcloud_evaluated_attribute()

◆ DRW_pointcloud_init()

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

◆ DRW_pointcloud_module_free()

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

◆ DRW_pointcloud_position_and_radius_buffer_get()

◆ DRW_subdiv_cache_free()

◆ drw_subdiv_compute_dispatch()

◆ DRW_subdivide_loose_geom()

◆ DRW_vertbuf_create_wiredata()

◆ DRW_volume_batch_cache_dirty_tag()

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

◆ DRW_volume_init()

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

◆ DRW_volume_module_free()

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

Definition at line 103 of file draw_volume.cc.

References DRW_volume_module_free().

Referenced by blender::DRW_viewport_data_free(), and DRW_volume_module_free().

◆ drw_volume_object_mesh_init()

template<typename PassType>
PassType * blender::draw::drw_volume_object_mesh_init ( PassType & ps,
Scene * scene,
Object * ob,
ListBaseWrapper< GPUMaterialAttribute > & attrs )

Definition at line 188 of file draw_volume.cc.

References blender::FluidDomainSettings::active_color, blender::FluidDomainSettings::active_fields, blender::BKE_mesh_texspace_get(), blender::BKE_modifier_is_enabled(), blender::BKE_modifiers_findby_type(), VolumeInfos::color_mul, blender::DRWContext::data, VolumeInfos::density_scale, blender::FluidModifierData::domain, blender::drw_get(), blender::DRW_object_get_data_for_drawing(), blender::DRW_smoke_ensure(), drw_volume_object_mesh_init(), blender::eModifierMode_Realtime, blender::eModifierType_Fluid, blender::FluidDomainSettings::flags, blender::FluidDomainSettings::flame_ignition, blender::FluidDomainSettings::flame_max_temp, blender::FluidDomainSettings::fluid, blender::FLUID_DOMAIN_ACTIVE_COLOR_SET, blender::FLUID_DOMAIN_ACTIVE_COLORS, blender::FLUID_DOMAIN_TYPE_GAS, blender::FLUID_DOMAIN_USE_NOISE, blender::math::from_scale(), VolumeInfos::grids_xform, blender::MatBase< float, 4, 4 >::identity(), blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::draw::detail::UniformCommon< T, len, device_only >::push_update(), blender::math::safe_rcp(), scale(), STR_ELEM, STREQ, VolumeInfos::temperature_bias, VolumeInfos::temperature_mul, blender::FluidDomainSettings::tex_color, blender::FluidDomainSettings::tex_density, blender::FluidDomainSettings::tex_flame, blender::FluidDomainSettings::type, UNPACK3, and blender::DRWData::volume_module.

Referenced by drw_volume_object_mesh_init(), and volume_sub_pass_implementation().

◆ 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, blender::math::dot(), and edge_factor_calc().

Referenced by edge_factor_calc(), and 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 edge_len_calc(), blender::v, and w().

Referenced by edge_len_calc(), and lattice_render_edges_len_get().

◆ edit_points_vert_format_get()

◆ editmesh_final_or_this()

◆ edituv_data_format()

◆ edituv_get_edituv_stretch_angle()

◆ edituv_request_active_uv()

◆ element_size()

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

◆ ENUM_OPERATORS() [2/3]

blender::draw::ENUM_OPERATORS ( InstancesFlags )

References ENUM_OPERATORS().

◆ ENUM_OPERATORS() [3/3]

◆ evaluate_vertex_weight()

◆ extract_attr_viewer()

◆ extract_attribute()

◆ extract_attribute_data() [1/2]

◆ extract_attribute_data() [2/2]

◆ extract_attribute_subdiv()

◆ extract_corner_normals_bm()

◆ extract_corner_normals_mesh()

◆ extract_data_bmesh()

void blender::draw::extract_data_bmesh ( const MeshRenderData & mr,
const BMDataLayerLookup & attr,
gpu::VertBuf & vbo )
static

Convert BMesh attribute values to the GPU format, in the index order of their domain.

Definition at line 102 of file extract_mesh_vbo_attributes.cc.

References blender::bm, blender::draw::MeshRenderData::bm, extract_data_bmesh(), T, blender::bke::attribute_math::to_static_type(), and blender::BMDataLayerLookup::type.

Referenced by extract_attribute_data(), and extract_data_bmesh().

◆ extract_edge_factor()

◆ extract_edge_factor_bm()

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

◆ extract_edit_subdiv_data_bm()

◆ extract_edit_subdiv_data_mesh()

◆ extract_edituv_data()

◆ extract_edituv_data_bm()

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

◆ extract_face_dot_positions_mesh()

◆ extract_face_dots()

◆ 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

◆ extract_face_dots_position()

◆ extract_face_dots_subdiv()

◆ extract_face_dots_uv()

◆ extract_face_dots_uv_bm()

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

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

◆ extract_face_normals_mesh()

template<typename GPUType>
void blender::draw::extract_face_normals_mesh ( const MeshRenderData & mr,
MutableSpan< GPUType > face_data )
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 IndexMask & loose_edges,
MutableSpan< T > gpu_data )

◆ extract_normals() [1/2]

gpu::VertBufPtr blender::draw::extract_normals ( const MeshRenderData & mr,
MeshBufferCache & cache,
bool use_hq )

◆ extract_normals() [2/2]

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

◆ extract_sculpt_data()

◆ extract_sculpt_data_subdiv()

◆ 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 27 of file extract_mesh_vbo_tan.cc.

References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), blender::BKE_editmesh_orco_tangents_calc(), blender::BKE_editmesh_uv_tangents_calc(), blender::BKE_mesh_orco_verts_transform(), blender::draw::MeshRenderData::bm, blender::draw::MeshRenderData::bm_face_normals, blender::draw::MeshRenderData::bm_loop_normals, blender::BM_mesh_vert_coords_alloc(), BMesh, blender::bke::mesh::calc_orco_tangents(), blender::bke::mesh::calc_uv_tangents(), blender::CD_ORCO, blender::draw::MeshBatchCache::cd_used, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::bke::Corner, blender::draw::MeshRenderData::corner_normals, blender::draw::MeshRenderData::corner_verts, blender::CustomData_get_layer(), blender::draw::MeshRenderData::edit_bmesh, extract_tan_init_common(), blender::draw::MeshRenderData::extract_type, blender::draw::MeshRenderData::face_normals, blender::draw::MeshRenderData::faces, blender::GPU_vertformat_alias_add(), blender::GPU_vertformat_attr_add(), blender::GPU_vertformat_deinterleave(), blender::GPU_vertformat_safe_attr_name(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::blender::StringRefBase::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::BMEditMesh::looptris, MAX_MTFACE, blender::draw::MeshRenderData::mesh, blender::draw::MeshRenderData::sharp_faces, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SNPRINTF, blender::Span< T >::Span(), blender::draw::DRW_MeshCDMask::tan, blender::draw::DRW_MeshCDMask::tan_orco, blender::Mesh::vert_data, blender::draw::MeshRenderData::vert_positions, and blender::draw::MeshRenderData::verts_num.

Referenced by extract_tan_init_common(), 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()

◆ extract_vert_normals_bm() [1/2]

◆ extract_vert_normals_bm() [2/2]

◆ extract_vert_normals_mesh() [1/2]

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

◆ extract_vert_normals_mesh() [2/2]

◆ extract_vert_positions_bm()

◆ extract_vert_positions_mesh()

◆ extract_weights()

◆ extract_weights_bm()

◆ extract_weights_mesh()

◆ extract_weights_subdiv()

◆ face_offsets_ensure()

◆ 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< DrawFilter(Object &, const DupliObject *dupli)> should_draw_object_cb,
FunctionRef< void(ObjectRef &)> draw_object_cb )
static

Iterate the scene, invoking draw_object_cb for objects and duplis that should_draw_object_cb accepts.

Parameters
draw_ctxThe active draw context; supplies depsgraph, evaluation mode, and viewport state.
should_draw_object_cbPer-object predicate. See #DrawFilter for return-value semantics.

Invoked:

  • Once per top-level scene object, but only when the object is either self-visible or has duplis to process; fully hidden non-instancers are short-circuited without a call. The dupli argument is null except for preview duplis.
  • Once per dupli (or for a group of duplis with the same InstancesKey) on a temporary Object, the dupli argument is the DupliObject it was created from. On this path the return value controls only whether the dupli is drawn; #SkipRecursive has no extra effect.
Parameters
draw_object_cbCallback to sync an ObjectRef (populate the engines to prepare for drawing). A single ObjectRef can point to multiple compatible (same InstancesKey) Object instances.

Definition at line 982 of file draw_context.cc.

References blender::BKE_object_visibility(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), blender::VectorList< T, CapacityStart, CapacityMax >::clear(), blender::DEG_get_mode(), blender::DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, blender::DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, blender::DEG_iterator_dupli_is_visible(), blender::DEG_iterator_object_is_visible(), blender::evil::DEG_iterator_temp_object_free_properties(), blender::evil::DEG_iterator_temp_object_from_dupli(), DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, blender::DEGObjectIterSettings::depsgraph, blender::DRWContext::depsgraph, blender::View3D::flag2, blender::DEGObjectIterSettings::flags, foreach_obref_in_scene(), blender::DEGObjectIterSettings::included_objects, invert(), blender::bke::ObjectRuntime::is_draw_dupli_reference_tmp_object, blender::VectorList< T, CapacityStart, CapacityMax >::is_empty(), blender::is_negative_m4(), IsNegativeScale, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::Object::light_linking, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::DupliObject::mat, blender::DupliObject::ob, blender::DupliObject::ob_data, blender::OB_NEG_SCALE, blender::OB_VISIBLE_INSTANCES, blender::OB_VISIBLE_PARTICLES, blender::OB_VISIBLE_SELF, blender::object_duplilist(), blender::bke::ObjectRuntime::object_to_world, blender::DupliObject::preview_base_geometry, blender::DupliObject::preview_instance_index, blender::Object::runtime, SET_FLAG_FROM_TEST, supports_handle_ranges(), blender::Object::transflag, blender::DRWContext::v3d, blender::V3D_SHOW_VIEWER, blender::DEGObjectIterSettings::viewer_path, blender::View3D::viewer_path, and blender::bke::ObjectRuntime::world_to_object.

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

◆ gather_edge_to_corner_gpu()

◆ gather_to_corner_gpu()

◆ gather_vert_to_corner_gpu()

◆ get_batch_cache()

◆ get_coarse_tan_format()

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

◆ get_dispatch_size()

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

◆ get_edit_data_format()

◆ 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

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

Array< float > blender::draw::get_radii_lengths ( const Span< float > lengths,
const VArray< float > & radii,
const IndexRange & points )
static

◆ get_sculpt_data_format()

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

◆ get_vert_normals()

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

◆ 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 788 of file draw_cache_impl_grease_pencil.cc.

References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), bezier_data_value(), blender::BLI_assert(), blender::array_utils::count_booleans(), blender::bke::Curve, blender::CURVE_HANDLE_ALL, blender::bke::curves::curve_to_point_selection(), blender::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_rad, blender::draw::GreasePencilBatchCache::edit_points_selection, blender::draw::GreasePencilBatchCache::edit_points_vflag, blender::MutableSpan< T >::fill(), blender::IndexRange::first(), blender::index_mask::IndexMask::foreach_index(), blender::array_utils::gather(), GPU_batch_create, blender::GPU_batch_vertbuf_add(), blender::GPU_indexbuf_build_ex(), blender::GPU_indexbuf_get_data(), blender::GPU_indexbuf_init(), blender::GPU_indexbuf_init_ex(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_PRIM_LINES, blender::GPU_PRIM_POINTS, blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, blender::GPU_USAGE_STATIC, blender::GPU_vertbuf_create_with_format_ex(), blender::GPU_vertbuf_data_alloc(), blender::GPU_vertbuf_use(), blender::GPU_vertformat_from_attribute(), grease_pencil_batch_cache_is_edit_discarded(), grease_pencil_cache_add_nurbs(), grease_pencil_edit_batch_ensure(), GREASE_PENCIL_EDIT_STROKE_END, GREASE_PENCIL_EDIT_STROKE_START, grease_pencil_get_editable_non_nurbs_curves(), grease_pencil_get_editable_selected_nurbs_curves(), 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::IndexRange::IndexRange(), INT_MAX, blender::draw::GreasePencilBatchCache::is_dirty, blender::index_mask::IndexMask::is_empty(), blender::IndexRange::last(), layer, blender::index_mask::masked_fill(), blender::bke::Point, blender::ed::greasepencil::retrieve_editable_and_all_selected_points(), 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(), blender::bke::greasepencil::selected_mask_to_fills(), blender::index_mask::IndexMask::size(), blender::blender::Span< T >::slice(), blender::MutableSpan< T >::slice(), blender::offset_indices::sum_group_sizes(), and blender::math::transform_points().

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

◆ 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 1287 of file draw_cache_impl_grease_pencil.cc.

References blender::threading::accumulated_task_sizes(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), attribute_interpolate(), blender::BKE_gpencil_material_settings(), blender::BLI_assert(), blender::copy_v2_v2(), blender::copy_v3_v3(), blender::copy_v4_v4(), blender::bke::Curve, blender::gpu::VertBuf::data(), blender::ed::greasepencil::DrawingInfo::drawing, blender::draw::GreasePencilColorVert::fcol, blender::bke::greasepencil::Drawing::fill_colors(), blender::array_utils::fill_index_range(), blender::bke::greasepencil::Drawing::fills(), blender::IndexRange::first(), blender::MutableSpan< T >::first(), float, blender::index_mask::IndexMask::foreach_index(), blender::draw::GreasePencilBatchCache::geom_batch, get_radii_lengths(), blender::GP_MATERIAL_MODE_LINE, blender::GP_MATERIAL_PLACEMENT_COUNT, blender::GP_MATERIAL_PLACEMENT_DENSITY, blender::GP_MATERIAL_PLACEMENT_RADIUS, blender::GP_STROKE_CAP_TYPE_ROUND, GPENCIL_MATERIAL_BUFFER_LEN, blender::GPU_indexbuf_get_data(), blender::GPU_indexbuf_init(), blender::GPU_PRIM_TRIS, blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, blender::GPU_USAGE_STATIC, blender::GPU_vertbuf_create_with_format_ex(), blender::GPU_vertbuf_data_alloc(), grease_pencil_color_format(), grease_pencil_geom_batch_ensure(), grease_pencil_stroke_format(), blender::draw::GreasePencilBatchCache::ibo, blender::index_mask::IndexMask::index_range(), blender::offset_indices::GroupedSpan< T >::index_range(), blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), INT_MAX, interpolate_corners(), blender::bke::greasepencil::Drawing::intersection_points(), blender::math::invert(), blender::Span< T >::is_empty(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::IndexRange::last(), blender::MutableSpan< T >::last(), blender::Span< T >::last(), layer, blender::ed::greasepencil::DrawingInfo::layer_index, blender::bke::AttributeAccessor::lookup_or_default(), blender::draw::GreasePencilStrokeVert::mat, blender::math::max(), blender::MaterialGPencilStyle::mode, blender::offset_indices::GroupedSpan< T >::offsets, blender::bke::greasepencil::Drawing::opacities(), pack_rotation_aspect_hardness_miter(), blender::threading::parallel_for(), blender::MaterialGPencilStyle::placement_count, blender::MaterialGPencilStyle::placement_mode, blender::bke::Point, blender::draw::GreasePencilStrokeVert::point_id, blender::draw::GreasePencilStrokeVert::pos, blender::bke::greasepencil::Drawing::radii(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::ed::greasepencil::retrieve_visible_fills(), blender::ed::greasepencil::retrieve_visible_strokes(), blender::IndexRange::size(), blender::Span< T >::size(), blender::index_mask::IndexMask::slice(), blender::MutableSpan< T >::slice(), blender::draw::GreasePencilStrokeVert::stroke_id, blender::bke::greasepencil::Drawing::strokes(), blender::offset_indices::sum_group_sizes(), blender::bke::greasepencil::Drawing::texture_matrices(), blender::math::transform_point(), blender::bke::greasepencil::Drawing::triangles(), blender::draw::GreasePencilStrokeVert::u_stroke, blender::draw::GreasePencilStrokeVert::uv_fill, blender::draw::GreasePencilBatchCache::vbo, and blender::draw::GreasePencilBatchCache::vbo_col.

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

◆ grease_pencil_get_editable_selected_nurbs_curves()

◆ grease_pencil_get_visible_non_nurbs_curves()

◆ grease_pencil_get_visible_nurbs_curves()

◆ 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 487 of file draw_cache_impl_grease_pencil.cc.

References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::BLI_assert(), blender::BLI_findlink(), blender::math::clamp(), blender::array_utils::copy(), blender::array_utils::count_booleans(), blender::bke::curves::curve_to_point_selection(), blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_POLY, blender::gpu::VertBuf::data(), blender::draw::GreasePencilBatchCache::edit_line_indices, blender::draw::GreasePencilBatchCache::edit_line_pos, blender::draw::GreasePencilBatchCache::edit_line_selection, blender::draw::GreasePencilBatchCache::edit_lines, blender::draw::GreasePencilBatchCache::edit_points, blender::draw::GreasePencilBatchCache::edit_points_indices, blender::draw::GreasePencilBatchCache::edit_points_pos, blender::draw::GreasePencilBatchCache::edit_points_selection, GPU_batch_create, blender::GPU_batch_vertbuf_add(), blender::GPU_indexbuf_build_ex(), blender::GPU_indexbuf_get_data(), blender::GPU_indexbuf_init(), blender::GPU_indexbuf_init_ex(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_PRIM_POINTS, blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, blender::GPU_USAGE_STATIC, blender::GPU_vertbuf_create_with_format_ex(), blender::GPU_vertbuf_data_alloc(), blender::GPU_vertbuf_use(), blender::GPU_vertformat_from_attribute(), grease_pencil_batch_cache_is_edit_discarded(), grease_pencil_cache_add_nurbs(), grease_pencil_get_visible_non_nurbs_curves(), grease_pencil_get_visible_nurbs_curves(), grease_pencil_weight_batch_ensure(), index_buf_add_line_points(), index_buf_add_nurbs_lines(), index_buf_add_points(), INT_MAX, blender::draw::GreasePencilBatchCache::is_dirty, layer, blender::bDeformGroup::name, blender::bke::Point, blender::ed::greasepencil::retrieve_editable_strokes(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::index_mask::IndexMask::size(), blender::MutableSpan< T >::slice(), blender::offset_indices::sum_group_sizes(), and blender::math::transform_points().

Referenced by DRW_cache_grease_pencil_weight_lines_get(), DRW_cache_grease_pencil_weight_points_get(), and grease_pencil_weight_batch_ensure().

◆ grease_pencil_wire_batch_ensure()

◆ gsplat_sub_pass_setup()

◆ hair_init()

◆ 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

◆ hair_sub_pass_setup()

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

◆ handle_range_right()

◆ handles_and_points_num()

◆ 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,
const 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 ( const bke::greasepencil::Drawing & drawing,
const IndexMask & curves_mask,
MutableSpan< uint > lines_data,
int * r_drawing_line_index,
int * r_drawing_line_start_offset )
static

◆ index_buf_add_nurbs_lines()

◆ index_buf_add_points()

void blender::draw::index_buf_add_points ( const bke::greasepencil::Drawing & drawing,
const IndexMask & curves_mask,
MutableSpan< uint > points_data,
int * r_drawing_point_index,
int * r_drawing_start_offset )
static

◆ index_mask_to_ibo() [1/2]

◆ index_mask_to_ibo() [2/2]

◆ init_batch_cache()

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

◆ init_empty_dummy_batch()

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

template<typename InputT, typename OutputT, eCustomDataType data_type>
gpu::VertBufPtr blender::draw::interpolate_face_corner_attribute_to_curve ( ParticleDrawSource & src,
const StringRef name )
static

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

◆ lattice_render_data_free()

◆ lattice_render_data_vert_bpoint()

◆ lattice_render_data_verts_len_get()

◆ lattice_render_edges_len_get()

◆ lattice_render_verts_len_get()

◆ 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

◆ lookup_meta_data()

std::optional< bke::AttributeMetaData > blender::draw::lookup_meta_data ( const Mesh & mesh,
const StringRef name )
static

◆ loose_data_upload()

template<typename T>
void blender::draw::loose_data_upload ( const MeshRenderData & mr,
const Span< T > loose_data,
gpu::VertBuf & dst )

◆ mesh_batch_cache_check_vertex_group()

◆ mesh_batch_cache_clear()

◆ mesh_batch_cache_discard_shaded_tri()

◆ mesh_batch_cache_discard_uvedit()

◆ mesh_batch_cache_discard_uvedit_select()

◆ mesh_batch_cache_ensure_subdiv_cache()

◆ mesh_batch_cache_free_subdiv_cache()

◆ mesh_batch_cache_get()

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

Definition at line 455 of file draw_cache_impl_mesh.cc.

References mesh_batch_cache_get().

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_blas(), 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(), DRW_mesh_batch_cache_get_wireframes_face(), and mesh_batch_cache_get().

◆ mesh_batch_cache_init()

◆ mesh_batch_cache_request_surface_batches()

◆ mesh_batch_cache_request_surface_blas()

◆ mesh_batch_cache_valid()

◆ mesh_buffer_cache_clear()

◆ mesh_buffer_cache_create_requested()

void blender::draw::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 )

◆ 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 352 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, 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, blender::draw::MeshBufferList::ibos, 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, blender::draw::MeshBufferList::vbos, and VertexGroupWeight.

Referenced by draw_subdiv_create_requested_buffers(), and mesh_buffer_cache_create_requested_subdiv().

◆ mesh_cd_calc_active_mask_uv_layer()

◆ mesh_cd_calc_active_uv_layer()

◆ mesh_cd_calc_edit_uv_layer()

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

◆ mesh_cd_calc_used_gpu_layers()

◆ mesh_cd_layers_type_merge()

◆ mesh_extract_uv_format_init()

◆ mesh_get_original_mesh()

const Mesh * blender::draw::mesh_get_original_mesh ( const Object & object)
static

◆ 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
is_editmodeWhen true, use the modifiers from the edit-data, otherwise don't use modifiers as they are not from this object.

Definition at line 409 of file draw_cache_extract_mesh_render_data.cc.

References blender::BKE_editmesh_bmesh_get(), blender::BKE_editmesh_cache_ensure_face_normals(), blender::BKE_editmesh_cache_ensure_vert_normals(), blender::BKE_object_material_used_with_fallback_eval(), blender::bm, blender::draw::MeshRenderData::bm, blender::BM_EDGE, blender::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, blender::BM_LOOP, blender::BM_mesh_active_edge_get(), blender::BM_mesh_active_face_get(), blender::BM_mesh_active_vert_get(), blender::BM_mesh_elem_index_ensure(), blender::BM_mesh_elem_table_ensure(), blender::BM_VERT, blender::draw::MeshRenderData::bm_vert_coords, blender::draw::MeshRenderData::bm_vert_normals, BMesh, bmesh_normals_domain(), blender::draw::MeshRenderData::bweight_ofs, blender::CD_ORIGINDEX, blender::CD_PROP_BOOL, blender::CD_PROP_FLOAT, blender::CD_PROP_FLOAT3, blender::draw::MeshRenderData::corner_edges, blender::draw::MeshRenderData::corner_tris_num, blender::draw::MeshRenderData::corner_verts, blender::draw::MeshRenderData::corners_num, blender::Mesh::corners_num, blender::CustomData_get_layer(), blender::CustomData_get_offset_named(), blender::DRW_object_get_editmesh_cage_for_drawing(), blender::BMesh::edata, blender::EDBM_uv_active_face_get(), blender::bke::Edge, blender::draw::MeshRenderData::edge_crease_ofs, blender::Mesh::edge_data, blender::draw::MeshRenderData::edges, blender::draw::MeshRenderData::edges_num, blender::Mesh::edges_num, blender::draw::MeshRenderData::edit_bmesh, blender::bke::MeshRuntime::edit_data, blender::draw::MeshRenderData::edit_data, blender::bke::MeshRuntime::edit_mesh, 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, blender::Mesh::face_data, blender::draw::MeshRenderData::faces, blender::draw::MeshRenderData::faces_num, blender::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, blender::bke::MeshRuntime::is_original_bmesh, blender::BMesh::ldata, blender::bke::AttributeAccessor::lookup(), blender::draw::MeshRenderData::material_indices, blender::draw::MeshRenderData::materials_num, blender::ME_WRAPPER_TYPE_BMESH, Mesh, blender::draw::MeshRenderData::mesh, mesh_get_original_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, blender::BMesh::pdata, blender::bke::Point, blender::poly_to_tri_count(), retrieve_active_attribute_names(), blender::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::BMesh::totedge, blender::BMesh::totface, blender::BMesh::totloop, blender::BMesh::totvert, blender::draw::MeshRenderData::use_hide, blender::BMesh::vdata, blender::draw::MeshRenderData::vert_crease_ofs, blender::Mesh::vert_data, blender::bke::EditMeshData::vert_positions, blender::draw::MeshRenderData::vert_positions, blender::draw::MeshRenderData::verts_num, blender::Mesh::verts_num, and blender::bke::MeshRuntime::wrapper_type.

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

◆ mesh_render_data_loose_geom_ensure()

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

Definition at line 42 of file extract_mesh_vbo_mesh_analysis.cc.

References BLI_INLINE, CLAMP, max, min, and overhang_remap().

Referenced by overhang_remap(), and statvis_calc_overhang().

◆ pack_rotation_aspect_hardness_miter()

◆ particle_batch_cache_clear()

◆ particle_batch_cache_clear_hair()

◆ particle_batch_cache_clear_point()

◆ 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

Definition at line 762 of file draw_cache_impl_particles.cc.

References blender::Mesh::active_color_attribute, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_mesh_tessface_ensure(), blender::CD_MCOL, blender::CD_MTFACE, blender::ParticleSystem::childcache, blender::bke::ColorByte, blender::bke::Corner, blender::CustomData_get_layer_n(), blender::bke::AttributeIter::data_type, blender::ParticleSettings::disp, blender::bke::AttributeIter::domain, blender::ParticleSettings::draw, blender::draw::ParticleHairCache::elems_len, blender::Mesh::fdata_legacy, float, blender::GPU_indexbuf_build(), GPU_INDEXBUF_DISCARD_SAFE, blender::GPU_indexbuf_init_ex(), blender::GPU_PRIM_LINE_STRIP, blender::GPU_vertbuf_data_alloc(), GPU_VERTBUF_DISCARD_SAFE, blender::GPU_vertformat_alias_add(), blender::GPU_vertformat_attr_add(), blender::GPU_vertformat_safe_attr_name(), blender::draw::HairAttributeID::ind, blender::draw::ParticleHairCache::indices, blender::MEM_new_array_uninitialized(), blender::ParticleSystemModifierData::mesh_final, blender::bke::AttributeIter::name, blender::ParticleSystem::part, blender::PART_DRAW_PARENT, particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_fill_segments(), PARTICLE_SOURCE_CHILDREN, PARTICLE_SOURCE_PARENT, blender::ParticleSystem::pathcache, blender::PTCacheEdit::pathcache, blender::draw::ParticleHairCache::point_len, blender::draw::HairAttributeID::pos, blender::draw::ParticleHairCache::pos, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), SNPRINTF_UTF8, blender::draw::HairAttributeID::tan, blender::PTCacheEdit::totcached, blender::ParticleSystem::totchild, and blender::ParticleSystem::totpart.

Referenced by DRW_particles_batch_cache_get_hair(), and particle_batch_cache_ensure_pos_and_seg().

◆ particle_batch_cache_fill_segments()

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

◆ particle_mface_index() [1/2]

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

◆ particle_mface_index() [2/2]

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

◆ particle_pack_mcol()

◆ pointcloud_batch_cache_clear()

◆ pointcloud_batch_cache_get()

◆ pointcloud_batch_cache_init()

◆ pointcloud_batch_cache_valid()

◆ pointcloud_discard_attributes()

◆ pointcloud_extract_attribute()

◆ pointcloud_extract_position_and_radius()

◆ pointcloud_is_gsplat()

◆ pointcloud_position_and_radius_get()

◆ pointcloud_sub_pass_setup()

◆ pointcloud_sub_pass_setup_implementation()

◆ pointcloud_surface_get()

◆ pointcloud_surface_shaded_get()

◆ precompute_sphere_points()

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

◆ 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(), blender::threading::parallel_for(), and process_ibo_verts_mesh().

Referenced by process_ibo_verts_mesh().

◆ 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 64 of file extract_mesh_ibo_lines_adjacency.cc.

References rotate_vector().

Referenced by lines_adjacency_triangle(), and rotate_vector().

◆ scatter_face_to_corner_gpu()

◆ sculpt_batches_get()

◆ sculpt_batches_get_ex()

◆ sculpt_batches_per_material_get()

◆ segment_radius_length()

float blender::draw::segment_radius_length ( const float l,
const float r1,
const float r2 )
static

Calculate the number of radii that can fit within a segment. (including fractional part)

For tapered segments the radii are calculated such that they tangentially touch the segment's taper and each other.

Definition at line 1244 of file draw_cache_impl_grease_pencil.cc.

References abs, blender::l, log, and segment_radius_length().

Referenced by get_radii_lengths(), and segment_radius_length().

◆ 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 458 of file extract_mesh_vbo_mesh_analysis.cc.

References BLI_INLINE, CLAMP, min, and sharp_remap().

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

Definition at line 472 of file extract_mesh_vbo_mesh_analysis.cc.

References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify(), angle(), blender::angle_normalized_v3v3(), blender::bm, blender::draw::MeshRenderData::bm, blender::BM_edge_calc_face_angle_signed(), blender::BM_EDGES_OF_MESH, BM_elem_index_get, BM_FACE_FIRST_LOOP, blender::BM_FACES_OF_MESH, BM_ITER_MESH, BMesh, blender::draw::MeshRenderData::corner_verts, blender::draw::MeshRenderData::corners_num, DEG2RADF, blender::e, blender::draw::MeshRenderData::edges_num, blender::draw::MeshRenderData::extract_type, blender::bke::mesh::face_corner_next(), blender::draw::MeshRenderData::face_normals, blender::draw::MeshRenderData::faces, blender::draw::MeshRenderData::faces_num, blender::is_edge_convex_v3(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::keys(), M_PI, max, blender::max_ff(), blender::MEM_new_array_uninitialized(), min, blender::BMLoop::next, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::MeshStatVis::sharp_max, blender::MeshStatVis::sharp_min, sharp_remap(), blender::ToolSettings::statvis, statvis_calc_sharp(), blender::draw::MeshRenderData::toolsettings, blender::BMLoop::v, blender::draw::MeshRenderData::vert_positions, and blender::draw::MeshRenderData::verts_num.

Referenced by extract_mesh_analysis(), and statvis_calc_sharp().

◆ 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 130 of file extract_mesh_vbo_mesh_analysis.cc.

References blender::BKE_bmbvh_free(), blender::BKE_bmbvh_new_from_editmesh(), blender::BKE_bmbvh_ray_cast(), blender::BLI_assert(), blender::BLI_jitter_init(), blender::bm, blender::draw::MeshRenderData::bm, BM_elem_index_get, blender::BM_FACE, bm_face_no_get(), blender::BM_FACES_OF_MESH, BM_ITER_MESH, blender::BM_mesh_elem_index_ensure(), bm_vert_co_get(), BMesh, blender::draw::MeshRenderData::corner_tris_num, blender::draw::MeshRenderData::corner_verts, blender::draw::MeshRenderData::corners_num, cos, blender::MutableSpan< T >::data(), blender::Span< T >::data(), blender::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, blender::Mesh::faces_num, blender::Span< T >::index_range(), blender::interp_v3_v3v3v3_uv(), blender::BMFace::len, blender::BMEditMesh::looptris, blender::madd_v3_v3fl(), blender::mat4_to_scale(), max, blender::draw::MeshRenderData::mesh, min, blender::normal_tri_v3(), blender::math::normalize(), blender::bke::bvh::Tree::ray_intersect(), scale(), blender::ToolSettings::statvis, statvis_calc_thickness(), blender::MeshStatVis::thickness_max, blender::MeshStatVis::thickness_min, thickness_remap(), blender::MeshStatVis::thickness_samples, blender::draw::MeshRenderData::toolsettings, uv_from_jitter_v2(), blender::v, and blender::draw::MeshRenderData::vert_positions.

Referenced by extract_mesh_analysis(), and statvis_calc_thickness().

◆ subdiv_edges_per_coarse_edge()

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

◆ subdiv_full_vbo_size()

◆ subdiv_loose_edges_num()

◆ 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 894 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, blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, CURVE_TYPE_SLOT, CURVES_ORDER_SLOT, blender::data, blender::gpu::VertBuf::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), lexit::Vector< T >::data(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), EVALUATED_ATTR_SLOT, EVALUATED_POINT_SLOT, blender::EXPECT_EQ(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4, blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_shader_create_from_info_name(), GPU_SHADER_FREE_SAFE, blender::GPU_shader_unbind(), 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(), lexit::Vector< T >::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 361 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, blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, CURVE_TYPE_SLOT, CURVES_LENGTH_SLOT, CURVES_ORDER_SLOT, blender::data, blender::gpu::VertBuf::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), lexit::Vector< T >::data(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::math::distance(), EVALUATED_POINT_SLOT, EVALUATED_POS_RAD_SLOT, EVALUATED_TIME_SLOT, blender::EXPECT_EQ(), EXPECT_NEAR, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_shader_create_from_info_name(), GPU_SHADER_FREE_SAFE, blender::GPU_shader_unbind(), blender::GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, blender::GPU_vertbuf_create_with_format_ex(), GPU_VERTBUF_DISCARD_SAFE, GPU_VERTEX_FORMAT_FUNC, blender::GSpan::GSpan(), HANDLES_POS_LEFT_SLOT, HANDLES_POS_RIGHT_SLOT, blender::MatBase< float, 4, 4 >::identity(), blender::IndexRange::IndexRange(), 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, 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(), lexit::Vector< T >::size(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::bke::curves::nurbs::BasisCache::start_indices, blender::draw::Manager::submit(), test_draw_curves_interpolate_position(), w(), blender::bke::curves::nurbs::BasisCache::weights, and blender::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(), blender::DRW_STATE_WRITE_COLOR, blender::DRW_STATE_WRITE_STENCIL, blender::draw::Texture::ensure_2d(), blender::EXPECT_EQ(), blender::fb(), blender::draw::detail::PassBase< DrawCommandBufType >::framebuffer_set(), blender::GPU_ATTACHMENT_IGNORE, blender::GPU_ATTACHMENT_READ, blender::GPU_ATTACHMENT_WRITE, blender::GPU_BARRIER_SHADER_IMAGE_ACCESS, blender::GPU_PRIM_TRIS, blender::GPU_SHADER_3D_IMAGE_COLOR, blender::GPU_shader_get_builtin_shader(), blender::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(), blender::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(), blender::draw::detail::PassBase< DrawCommandBufType >::subpass_transition(), and test_draw_pass_all_commands().

Referenced by test_draw_pass_all_commands().

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

References test_eevee_shadow_alloc().

Referenced by test_eevee_shadow_alloc().

◆ test_eevee_shadow_defrag()

void blender::draw::test_eevee_shadow_defrag ( )
static

◆ 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 778 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, blender::data, blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::DRW_shaders_free(), blender::draw::Texture::ensure_2d(), blender::EXPECT_EQ(), blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_BARRIER_TEXTURE_UPDATE, blender::GPU_DATA_UINT, blender::GPU_multi_viewport_support(), blender::GPU_render_begin(), blender::GPU_render_end(), blender::GPU_shader_create_from_info_name(), blender::GPU_shader_free(), blender::GPU_shader_unbind(), blender::GPU_storagebuf_clear(), blender::GPU_TEXTURE_USAGE_HOST_READ, blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::GPU_TEXTURE_USAGE_SHADER_WRITE, blender::eevee::ShadowTileMapData::half_size, blender::MatBase< float, 4, 4 >::identity(), blender::IndexRange::IndexRange(), 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::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::draw::Texture::read(), blender::result, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::eevee::SHADOW_NO_DATA, blender::eevee::SHADOW_PROJECTION_CUBEFACE, 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, blender::x, and y.

Referenced by test_eevee_shadow_finalize().

◆ test_eevee_shadow_free()

◆ test_eevee_shadow_page_mask()

void blender::draw::test_eevee_shadow_page_mask ( )
static

◆ test_eevee_shadow_page_mask_ex()

◆ test_eevee_shadow_shift()

void blender::draw::test_eevee_shadow_shift ( )
static

Definition at line 100 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::eevee::ShadowTileMapData::clip_data_index, blender::eevee::ShadowTileMapClip::clip_far, blender::eevee::ShadowTileMapClip::clip_far_stored, blender::eevee::ShadowTileMapClip::clip_near, blender::eevee::ShadowTileMapClip::clip_near_stored, blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::DRW_shaders_free(), blender::EXPECT_EQ(), blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_render_begin(), blender::GPU_render_end(), blender::GPU_shader_create_from_info_name(), blender::GPU_shader_free(), blender::GPU_shader_unbind(), blender::eevee::ShadowTileMapData::grid_shift, blender::IndexRange::IndexRange(), blender::eevee::ShadowTileMapData::projection_type, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), 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(), blender::eevee::SHADOW_PROJECTION_CLIPMAP, blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::Manager::submit(), test_eevee_shadow_shift(), tile, blender::eevee::ShadowTileMapData::tiles_index, blender::x, and y.

Referenced by test_eevee_shadow_shift().

◆ 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 200 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::draw::detail::PassBase< DrawCommandBufType >::draw(), blender::DRW_shaders_free(), blender::draw::Manager::end_sync(), blender::EXPECT_EQ(), blender::fb(), blender::draw::detail::PassBase< DrawCommandBufType >::framebuffer_set(), from_loc_rot_scale(), blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_BARRIER_SHADER_STORAGE, GPU_BATCH_DISCARD_SAFE, blender::GPU_batch_unit_cube(), blender::GPU_framebuffer_create(), blender::GPU_framebuffer_default_size(), GPU_FRAMEBUFFER_FREE_SAFE, blender::GPU_render_begin(), blender::GPU_render_end(), blender::GPU_shader_create_from_info_name(), blender::GPU_shader_free(), blender::GPU_shader_unbind(), blender::MatBase< float, 4, 4 >::identity(), Quaternion::identity(), blender::draw::ResourceHandle::index(), blender::IndexRange::IndexRange(), len(), blender::eevee::LIGHT_OMNI_SPHERE, blender::math::projection::orthographic(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), 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::result, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::eevee::SHADOW_PROJECTION_CLIPMAP, blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::Manager::submit(), blender::draw::View::sync(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::eevee::ShadowTileMap::sync_orthographic(), test_eevee_shadow_tag_update(), 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 1258 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(), blender::DRW_shaders_free(), blender::draw::Texture::ensure_2d(), blender::EXPECT_EQ(), blender::Vector< T, InlineBufferCapacity, Allocator >::fill(), blender::GPU_BARRIER_TEXTURE_UPDATE, blender::GPU_DATA_UINT, blender::GPU_render_begin(), blender::GPU_render_end(), blender::GPU_shader_create_from_info_name(), blender::GPU_shader_free(), blender::GPU_shader_unbind(), blender::GPU_texture_update_sub(), blender::GPU_TEXTURE_USAGE_HOST_READ, blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::GPU_TEXTURE_USAGE_SHADER_WRITE, blender::MatBase< float, 4, 4 >::identity(), blender::IndexRange::IndexRange(), 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, blender::math::projection::orthographic(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::draw::Texture::read(), blender::result, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::draw::Manager::submit(), blender::eevee::LightCullingData::sun_lights_len, blender::draw::View::sync(), test_eevee_shadow_tilemap_amend(), tile, blender::eevee::LightData::tilemap_index, blender::eevee::LightData::type, blender::x, and y.

Referenced by test_eevee_shadow_tilemap_amend().

◆ test_eevee_surfel_list()

void blender::draw::test_eevee_surfel_list ( )
static

Simulate surfels on a 2x2 projection grid covering [0..2] on the Z axis.

Definition at line 1860 of file eevee_test.cc.

References blender::draw::StorageVectorBuffer< T, len >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::ceil_to_multiple_u(), blender::draw::detail::DataBuffer< T, len, device_only >::data(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::DRW_shaders_free(), blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_render_begin(), blender::GPU_render_end(), blender::GPU_shader_create_from_info_name(), blender::GPU_shader_free(), blender::GPU_shader_unbind(), blender::GPU_storagebuf_clear(), blender::MatBase< float, 4, 4 >::identity(), blender::eevee::SurfelListInfoData::list_max, blender::eevee::Surfel::normal, blender::math::projection::orthographic(), blender::eevee::Surfel::position, blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), blender::eevee::SurfelListInfoData::ray_grid_size, blender::draw::detail::StorageCommon< T, len, device_only >::read(), blender::draw::StorageArrayBuffer< T, len, device_only >::resize(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::Manager::submit(), blender::eevee::CaptureInfoData::surfel_len, blender::draw::View::sync(), and test_eevee_surfel_list().

Referenced by test_eevee_surfel_list().

◆ texpaint_request_active_uv()

◆ thickness_remap()

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

Definition at line 116 of file extract_mesh_vbo_mesh_analysis.cc.

References BLI_INLINE, CLAMP, max, min, and thickness_remap().

Referenced by statvis_calc_thickness(), and thickness_remap().

◆ to_blend()

◆ to_depth_test()

◆ to_face_cull_test()

◆ 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 88 of file draw_cache_extract_mesh.cc.

References blender::bke::Corner, blender::bke::Int16_2D, blender::draw::MeshRenderData::mesh, blender::RenderData::mode, blender::Scene::r, blender::R_SIMPLIFY, blender::R_SIMPLIFY_NORMALS, and use_normals_simplify().

Referenced by mesh_buffer_cache_create_requested(), and use_normals_simplify().

◆ 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 104 of file extract_mesh_vbo_mesh_analysis.cc.

References blender::clamp_v2(), and uv_from_jitter_v2().

Referenced by statvis_calc_thickness(), and uv_from_jitter_v2().

◆ v2_to_short_angle()

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

◆ vbo_create()

gpu::VertBufPtr blender::draw::vbo_create ( const GPUVertFormat & format,
const int size )
static

◆ 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 blender::v, vert_len_calc(), and w().

Referenced by lattice_render_verts_len_get(), and vert_len_calc().

◆ 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 289 of file draw_volume.cc.

References volume_sub_pass(), and volume_sub_pass_implementation().

Referenced by blender::eevee::geometry_volume_call(), hair_init(), blender::eevee::WorldVolumePipeline::sync(), blender::eevee::SyncModule::sync_volume(), and volume_sub_pass().

◆ volume_sub_pass_implementation()

◆ volume_world_grids_init()

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 1591 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 1763 of file draw_cache_impl_subdivision.cc.

Referenced by DRW_cache_free_old_subdiv(), and DRW_subdiv_cache_free().

◆ gpu_subdiv_queue_mutex

Mutex blender::draw::gpu_subdiv_queue_mutex
static

◆ LIGHT_LINK_MASK_ALL

uint64_t blender::draw::LIGHT_LINK_MASK_ALL = ~uint64_t(0)
staticconstexpr

◆ radiance_coeffs_max

uint32_t blender::draw::radiance_coeffs_max = (radiance_degs_max + 1u) * (radiance_degs_max + 1u)
constexpr

◆ radiance_degs_max

uint32_t blender::draw::radiance_degs_max = 3
constexpr

Definition at line 60 of file draw_cache_impl_gsplat.cc.

◆ value_opacity_default

float blender::draw::value_opacity_default = 0.5f
constexpr

◆ value_scale_default

float blender::draw::value_scale_default = 1e-2f
constexpr