Blender V5.0
blender::draw::CurvesEvalCache Struct Reference

#include <draw_curves_private.hh>

Public Member Functions

void ensure_attribute (struct CurvesModule &module, const bke::CurvesGeometry &curves, StringRef name, int index)
void ensure_attributes (struct CurvesModule &module, const bke::CurvesGeometry &curves, const GPUMaterial *gpu_material)
void ensure_common (const bke::CurvesGeometry &curves)
void ensure_bezier (const bke::CurvesGeometry &curves)
void ensure_nurbs (const bke::CurvesGeometry &curves)
void ensure_positions (CurvesModule &module, const bke::CurvesGeometry &curves)
gpu::VertBufPtrindirection_buf_get (CurvesModule &module, const bke::CurvesGeometry &curves, int face_per_segment)
gpu::Batch * batch_get (int evaluated_point_count, int curve_count, int face_per_segment, bool use_cyclic, bool &r_over_limit)
void discard_attributes ()
void clear ()
void ensure_attribute (CurvesModule &module, ParticleDrawSource &src, const Mesh &mesh, const StringRef name, const int index)
void ensure_attributes (CurvesModule &module, ParticleDrawSource &src, const GPUMaterial *gpu_material)
void ensure_common (ParticleDrawSource &src)
void ensure_positions (CurvesModule &module, ParticleDrawSource &src)
gpu::VertBufPtrindirection_buf_get (CurvesModule &module, ParticleDrawSource &src, int face_per_segment)

Public Attributes

gpu::VertBufPtr evaluated_pos_rad_buf
gpu::VertBufPtr evaluated_time_buf
gpu::VertBufPtr curves_length_buf
gpu::VertBufPtr indirection_ribbon_buf
gpu::VertBufPtr indirection_cylinder_buf
gpu::VertBufPtr points_by_curve_buf
gpu::VertBufPtr evaluated_points_by_curve_buf
gpu::VertBufPtr curves_type_buf
gpu::VertBufPtr curves_resolution_buf
gpu::VertBufPtr curves_cyclic_buf
gpu::VertBufPtr handles_positions_left_buf
gpu::VertBufPtr handles_positions_right_buf
gpu::VertBufPtr bezier_offsets_buf
gpu::VertBufPtr curves_order_buf
gpu::VertBufPtr control_weights_buf
gpu::VertBufPtr basis_cache_buf
gpu::VertBufPtr basis_cache_offset_buf
VectorSet< std::string > attr_used
VectorSet< std::string > attr_used_over_time
int last_attr_matching_time
gpu::VertBufPtr curve_attributes_buf [GPU_MAX_ATTR]
gpu::VertBufPtr evaluated_attributes_buf [GPU_MAX_ATTR]
std::array< bool, GPU_MAX_ATTRattributes_point_domain
std::array< gpu::Batch *, MAX_FACE_PER_SEGMENTbatch
int resolution = 0

Detailed Description

Definition at line 122 of file draw_curves_private.hh.

Member Function Documentation

◆ batch_get()

gpu::Batch * blender::draw::CurvesEvalCache::batch_get ( int evaluated_point_count,
int curve_count,
int face_per_segment,
bool use_cyclic,
bool & r_over_limit )

◆ clear()

◆ discard_attributes()

void blender::draw::CurvesEvalCache::discard_attributes ( )

◆ ensure_attribute() [1/2]

void blender::draw::CurvesEvalCache::ensure_attribute ( CurvesModule & module,
ParticleDrawSource & src,
const Mesh & mesh,
const StringRef name,
const int index )

◆ ensure_attribute() [2/2]

◆ ensure_attributes() [1/2]

◆ ensure_attributes() [2/2]

◆ ensure_bezier()

◆ ensure_common() [1/2]

◆ ensure_common() [2/2]

◆ ensure_nurbs()

◆ ensure_positions() [1/2]

◆ ensure_positions() [2/2]

◆ indirection_buf_get() [1/2]

gpu::VertBufPtr & blender::draw::CurvesEvalCache::indirection_buf_get ( CurvesModule & module,
const bke::CurvesGeometry & curves,
int face_per_segment )

◆ indirection_buf_get() [2/2]

gpu::VertBufPtr & blender::draw::CurvesEvalCache::indirection_buf_get ( CurvesModule & module,
ParticleDrawSource & src,
int face_per_segment )

Member Data Documentation

◆ attr_used

◆ attr_used_over_time

VectorSet<std::string> blender::draw::CurvesEvalCache::attr_used_over_time

Attributes that were used at some point. This is used for garbage collection, to remove attributes that are not used in shaders anymore due to user edits.

Definition at line 184 of file draw_curves_private.hh.

Referenced by blender::draw::DRW_curves_batch_cache_free_old(), ensure_attributes(), and ensure_attributes().

◆ attributes_point_domain

std::array<bool, GPU_MAX_ATTR> blender::draw::CurvesEvalCache::attributes_point_domain

◆ basis_cache_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::basis_cache_buf

Buffer containing all nurbs::BasisCache concatenated.

Definition at line 172 of file draw_curves_private.hh.

Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ basis_cache_offset_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::basis_cache_offset_buf

Buffer containing offsets to the start of each nurbs::BasisCache for each curve.

Definition at line 174 of file draw_curves_private.hh.

Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ batch

std::array<gpu::Batch *, MAX_FACE_PER_SEGMENT> blender::draw::CurvesEvalCache::batch

Definition at line 199 of file draw_curves_private.hh.

Referenced by batch_get(), and clear().

◆ bezier_offsets_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::bezier_offsets_buf

Buffer containing EvaluatedOffsets::all_bezier_offsets.

Definition at line 163 of file draw_curves_private.hh.

Referenced by clear(), ensure_bezier(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ control_weights_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::control_weights_buf

Buffer containing CurveGeometry::nurbs_weights().

Definition at line 170 of file draw_curves_private.hh.

Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ curve_attributes_buf

◆ curves_cyclic_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_cyclic_buf

◆ curves_length_buf

◆ curves_order_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_order_buf

Buffer containing CurveGeometry::nurbs_orders().

Definition at line 168 of file draw_curves_private.hh.

Referenced by clear(), ensure_nurbs(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ curves_resolution_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_resolution_buf

◆ curves_type_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::curves_type_buf

◆ evaluated_attributes_buf

◆ evaluated_points_by_curve_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::evaluated_points_by_curve_buf

◆ evaluated_pos_rad_buf

◆ evaluated_time_buf

◆ handles_positions_left_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::handles_positions_left_buf

Buffer containing CurveGeometry::handle_positions_left().

Definition at line 159 of file draw_curves_private.hh.

Referenced by clear(), ensure_bezier(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ handles_positions_right_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::handles_positions_right_buf

Buffer containing CurveGeometry::handle_positions_right().

Definition at line 161 of file draw_curves_private.hh.

Referenced by clear(), ensure_bezier(), and blender::draw::CurvesModule::evaluate_curve_attribute().

◆ indirection_cylinder_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::indirection_cylinder_buf

Definition at line 141 of file draw_curves_private.hh.

Referenced by clear(), indirection_buf_get(), and indirection_buf_get().

◆ indirection_ribbon_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::indirection_ribbon_buf

Definition at line 139 of file draw_curves_private.hh.

Referenced by clear(), indirection_buf_get(), and indirection_buf_get().

◆ last_attr_matching_time

int blender::draw::CurvesEvalCache::last_attr_matching_time

The last time in seconds that the attr_used and attr_used_over_time were exactly the same. If the delta between this time and the current scene time is greater than the timeout set in user preferences (U.vbotimeout) then garbage collection is performed.

Definition at line 190 of file draw_curves_private.hh.

Referenced by blender::draw::DRW_curves_batch_cache_free_old().

◆ points_by_curve_buf

gpu::VertBufPtr blender::draw::CurvesEvalCache::points_by_curve_buf

◆ resolution

int blender::draw::CurvesEvalCache::resolution = 0

Definition at line 231 of file draw_curves_private.hh.

Referenced by blender::draw::hair_particle_get_eval_cache().


The documentation for this struct was generated from the following files: