Blender V4.3
draw_cache_impl_curves.cc File Reference

Curves API for render engines. More...

#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_array_utils.hh"
#include "BLI_listbase.h"
#include "BLI_math_base.h"
#include "BLI_math_matrix.hh"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_span.hh"
#include "BLI_task.hh"
#include "BLI_utildefines.h"
#include "DNA_curves_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DEG_depsgraph_query.hh"
#include "BKE_crazyspace.hh"
#include "BKE_curves.hh"
#include "BKE_curves_utils.hh"
#include "BKE_customdata.hh"
#include "BKE_geometry_set.hh"
#include "GPU_batch.hh"
#include "GPU_context.hh"
#include "GPU_material.hh"
#include "GPU_texture.hh"
#include "DRW_render.hh"
#include "draw_attributes.hh"
#include "draw_cache_impl.hh"
#include "draw_cache_inline.hh"
#include "draw_curves_private.hh"

Go to the source code of this file.

Classes

struct  blender::draw::CurvesBatchCache
 
struct  blender::draw::PositionAndParameter
 

Namespaces

namespace  blender
 
namespace  blender::draw
 

Macros

#define EDIT_CURVES_NURBS_CONTROL_POINT   (1u)
 
#define EDIT_CURVES_BEZIER_HANDLE   (1u << 1)
 
#define EDIT_CURVES_ACTIVE_HANDLE   (1u << 2)
 
#define EDIT_CURVES_HANDLE_TYPES_SHIFT   (4u)
 

Functions

static GPUVertFormat blender::draw::single_attr_vbo_format (const char *name, const GPUVertCompType comp_type, const uint comp_len, const GPUVertFetchMode fetch_mode, uint &attr_id=DUMMY_ID)
 
static bool blender::draw::batch_cache_is_dirty (const Curves &curves)
 
static void blender::draw::init_batch_cache (Curves &curves)
 
static void blender::draw::discard_attributes (CurvesEvalCache &eval_cache)
 
static void blender::draw::clear_edit_data (CurvesBatchCache *cache)
 
static void blender::draw::clear_final_data (CurvesEvalFinalCache &final_cache)
 
static void blender::draw::clear_eval_data (CurvesEvalCache &eval_cache)
 
static void blender::draw::clear_batch_cache (Curves &curves)
 
static CurvesBatchCacheblender::draw::get_batch_cache (Curves &curves)
 
static void blender::draw::fill_points_position_time_vbo (const OffsetIndices< int > points_by_curve, const Span< float3 > positions, MutableSpan< PositionAndParameter > posTime_data, MutableSpan< float > hairLength_data)
 
static void blender::draw::create_points_position_time_vbo (const bke::CurvesGeometry &curves, CurvesEvalCache &cache)
 
static uint32_t blender::draw::bezier_data_value (int8_t handle_type, bool is_active)
 
static void blender::draw::create_edit_points_position_and_data (const bke::CurvesGeometry &curves, const IndexMask bezier_curves, const OffsetIndices< int > bezier_dst_offsets, const bke::crazyspace::GeometryDeformation deformation, CurvesBatchCache &cache)
 
static void blender::draw::create_edit_points_selection (const bke::CurvesGeometry &curves, const IndexMask bezier_curves, const OffsetIndices< int > bezier_dst_offsets, CurvesBatchCache &cache)
 
static void blender::draw::create_sculpt_cage_ibo (const OffsetIndices< int > points_by_curve, CurvesBatchCache &cache)
 
static void blender::draw::calc_edit_handles_ibo (const bke::CurvesGeometry &curves, const IndexMask bezier_curves, const OffsetIndices< int > bezier_offsets, const IndexMask other_curves, CurvesBatchCache &cache)
 
static void blender::draw::alloc_final_attribute_vbo (CurvesEvalCache &cache, const GPUVertFormat &format, const int index, const char *)
 
static void blender::draw::ensure_control_point_attribute (const Curves &curves, CurvesEvalCache &cache, const DRW_AttributeRequest &request, const int index, const GPUVertFormat &format)
 
static void blender::draw::ensure_final_attribute (const Curves &curves, CurvesEvalCache &cache, const DRW_AttributeRequest &request, const int index)
 
static void blender::draw::fill_curve_offsets_vbos (const OffsetIndices< int > points_by_curve, GPUVertBufRaw &data_step, GPUVertBufRaw &seg_step)
 
static void blender::draw::create_curve_offsets_vbos (const OffsetIndices< int > points_by_curve, CurvesEvalCache &cache)
 
static void blender::draw::alloc_final_points_vbo (CurvesEvalCache &cache)
 
static void blender::draw::calc_final_indices (const bke::CurvesGeometry &curves, CurvesEvalCache &cache, const int thickness_res)
 
static bool blender::draw::ensure_attributes (const Curves &curves, CurvesBatchCache &cache, const GPUMaterial *gpu_material)
 
static void blender::draw::request_attribute (Curves &curves, const char *name)
 
void blender::draw::drw_curves_get_attribute_sampler_name (const char *layer_name, char r_sampler_name[32])
 
bool blender::draw::curves_ensure_procedural_data (Curves *curves_id, CurvesEvalCache **r_cache, const GPUMaterial *gpu_material, const int subdiv, const int thickness_res)
 
static void blender::draw::create_edit_lines_ibo (const bke::CurvesGeometry &curves, CurvesBatchCache &cache)
 
static void blender::draw::create_edit_points_position_vbo (const bke::CurvesGeometry &curves, const bke::crazyspace::GeometryDeformation &, CurvesBatchCache &cache)
 
Expose via BKE callbacks
void blender::draw::DRW_curves_batch_cache_dirty_tag (Curves *curves, int mode)
 
void blender::draw::DRW_curves_batch_cache_validate (Curves *curves)
 
void blender::draw::DRW_curves_batch_cache_free (Curves *curves)
 
Garbage Collection
void blender::draw::DRW_curves_batch_cache_free_old (Curves *curves, int ctime)
 
Curves
int blender::draw::DRW_curves_material_count_get (const Curves *curves)
 
blender::gpu::Batch * blender::draw::DRW_curves_batch_cache_get_edit_points (Curves *curves)
 
blender::gpu::Batch * blender::draw::DRW_curves_batch_cache_get_sculpt_curves_cage (Curves *curves)
 
blender::gpu::Batch * blender::draw::DRW_curves_batch_cache_get_edit_curves_handles (Curves *curves)
 
blender::gpu::Batch * blender::draw::DRW_curves_batch_cache_get_edit_curves_lines (Curves *curves)
 
gpu::VertBuf ** blender::draw::DRW_curves_texture_for_evaluated_attribute (Curves *curves, const char *name, bool *r_is_point_domain)
 
void blender::draw::DRW_curves_batch_cache_create_requested (Object *ob)
 

Variables

static uint blender::draw::DUMMY_ID
 

Detailed Description

Curves API for render engines.

Definition in file draw_cache_impl_curves.cc.

Macro Definition Documentation

◆ EDIT_CURVES_ACTIVE_HANDLE

#define EDIT_CURVES_ACTIVE_HANDLE   (1u << 2)

◆ EDIT_CURVES_BEZIER_HANDLE

#define EDIT_CURVES_BEZIER_HANDLE   (1u << 1)

◆ EDIT_CURVES_HANDLE_TYPES_SHIFT

#define EDIT_CURVES_HANDLE_TYPES_SHIFT   (4u)

Definition at line 54 of file draw_cache_impl_curves.cc.

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

◆ EDIT_CURVES_NURBS_CONTROL_POINT

#define EDIT_CURVES_NURBS_CONTROL_POINT   (1u)