Blender
V3.3
|
Particle API for render engines. More...
#include "DRW_render.h"
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_ghash.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_customdata_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_particle_types.h"
#include "BKE_customdata.h"
#include "BKE_mesh.h"
#include "BKE_mesh_legacy_convert.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "ED_particle.h"
#include "GPU_batch.h"
#include "GPU_material.h"
#include "DEG_depsgraph_query.h"
#include "draw_cache_impl.h"
#include "draw_hair_private.h"
Go to the source code of this file.
Classes | |
struct | ParticlePointCache |
struct | ParticleBatchCache |
struct | HairAttributeID |
struct | EditStrandData |
struct | ParticleDrawSource |
Typedefs | |
typedef struct ParticlePointCache | ParticlePointCache |
typedef struct ParticleBatchCache | ParticleBatchCache |
typedef struct HairAttributeID | HairAttributeID |
typedef struct EditStrandData | EditStrandData |
typedef enum ParticleSource | ParticleSource |
typedef struct ParticleDrawSource | ParticleDrawSource |
Enumerations | |
enum | ParticleSource { PARTICLE_SOURCE_PARENT , PARTICLE_SOURCE_CHILDREN } |
Particle API for render engines.
Definition in file draw_cache_impl_particles.c.
typedef struct EditStrandData EditStrandData |
typedef struct HairAttributeID HairAttributeID |
typedef struct ParticleBatchCache ParticleBatchCache |
typedef struct ParticleDrawSource ParticleDrawSource |
typedef struct ParticlePointCache ParticlePointCache |
typedef enum ParticleSource ParticleSource |
enum ParticleSource |
Enumerator | |
---|---|
PARTICLE_SOURCE_PARENT | |
PARTICLE_SOURCE_CHILDREN |
Definition at line 490 of file draw_cache_impl_particles.c.
|
static |
Definition at line 244 of file draw_cache_impl_particles.c.
References ParticleHairCache::elems_len, ParticleHairCache::point_len, ParticleCacheKey::segments, and ParticleHairCache::strands_len.
Referenced by ensure_seg_pt_count().
void DRW_particle_batch_cache_dirty_tag | ( | ParticleSystem * | psys, |
int | mode | ||
) |
Definition at line 148 of file draw_cache_impl_particles.c.
References ParticleSystem::batch_cache, BKE_PARTICLE_BATCH_DIRTY_ALL, BLI_assert, ParticleBatchCache::is_dirty, and NULL.
Referenced by DRW_engines_register().
void DRW_particle_batch_cache_free | ( | ParticleSystem * | psys | ) |
Definition at line 230 of file draw_cache_impl_particles.c.
References ParticleSystem::batch_cache, ParticleBatchCache::edit_hair, ParticleBatchCache::hair, MEM_SAFE_FREE, particle_batch_cache_clear(), and particle_batch_cache_free_hair().
Referenced by DRW_engines_register().
|
static |
Definition at line 1467 of file draw_cache_impl_particles.c.
References DEG_get_original_object(), DRWContextState::depsgraph, DRW_context_state_get(), ParticleDrawSource::edit, ParticleDrawSource::md, ParticleDrawSource::object, ParticleDrawSource::psys, psys_in_edit_mode(), and psys_orig_get().
Referenced by DRW_particles_batch_cache_get_hair(), and particles_ensure_procedural_data().
|
static |
Definition at line 1446 of file draw_cache_impl_particles.c.
References DEG_get_original_id(), DEG_get_original_object(), DRWContextState::depsgraph, DRW_context_state_get(), drw_particle_update_ptcache_edit(), Scene::id, Object::mode, NULL, OB_MODE_PARTICLE_EDIT, PE_create_current(), and DRWContextState::scene.
Referenced by DRW_particles_batch_cache_get_hair(), and particles_ensure_procedural_data().
|
static |
Definition at line 1418 of file draw_cache_impl_particles.c.
References DAG_EVAL_RENDER, DEG_get_ctime(), DEG_get_mode(), DEG_get_original_id(), DEG_get_original_object(), depsgraph, DRWContextState::depsgraph, DRW_context_state_get(), ParticleSystem::flag, Scene::id, NULL, PTCacheEdit::pathcache, PE_update_object(), PTCacheEdit::psys, psys_cache_edit_paths(), PSYS_HAIR_UPDATED, and DRWContextState::scene.
Referenced by drw_particle_update_ptcache(), DRW_particles_batch_cache_get_edit_inner_points(), DRW_particles_batch_cache_get_edit_strands(), and DRW_particles_batch_cache_get_edit_tip_points().
GPUBatch* DRW_particles_batch_cache_get_dots | ( | Object * | object, |
ParticleSystem * | psys | ||
) |
Definition at line 1501 of file draw_cache_impl_particles.c.
References GPU_batch_create, GPU_PRIM_POINTS, NULL, particle_batch_cache_ensure_pos(), particle_batch_cache_get(), ParticleBatchCache::point, ParticlePointCache::points, and ParticlePointCache::pos.
Referenced by DRW_cache_particles_get_dots().
GPUBatch* DRW_particles_batch_cache_get_edit_inner_points | ( | Object * | object, |
ParticleSystem * | psys, | ||
PTCacheEdit * | edit | ||
) |
Definition at line 1616 of file draw_cache_impl_particles.c.
References drw_particle_update_ptcache_edit(), ParticleBatchCache::edit_inner_points, ParticleBatchCache::edit_inner_pos, ensure_edit_inner_points_count(), GPU_batch_create, GPU_PRIM_POINTS, NULL, particle_batch_cache_ensure_edit_inner_pos(), and particle_batch_cache_get().
Referenced by DRW_cache_particles_get_edit_inner_points().
GPUBatch* DRW_particles_batch_cache_get_edit_strands | ( | Object * | object, |
ParticleSystem * | psys, | ||
PTCacheEdit * | edit, | ||
bool | use_weight | ||
) |
Definition at line 1549 of file draw_cache_impl_particles.c.
References drw_particle_update_ptcache_edit(), ParticleBatchCache::edit_hair, ParticleBatchCache::edit_is_weight, ensure_seg_pt_count(), GPU_batch_create, GPU_BATCH_DISCARD_SAFE, GPU_PRIM_LINE_STRIP, GPU_VERTBUF_DISCARD_SAFE, ParticleHairCache::hairs, ParticleHairCache::indices, NULL, particle_batch_cache_ensure_edit_pos_and_seg(), particle_batch_cache_get(), and ParticleHairCache::pos.
Referenced by DRW_cache_particles_get_edit_strands().
GPUBatch* DRW_particles_batch_cache_get_edit_tip_points | ( | Object * | object, |
ParticleSystem * | psys, | ||
PTCacheEdit * | edit | ||
) |
Definition at line 1673 of file draw_cache_impl_particles.c.
References drw_particle_update_ptcache_edit(), ParticleBatchCache::edit_tip_points, ParticleBatchCache::edit_tip_pos, ensure_edit_tip_points_count(), GPU_batch_create, GPU_PRIM_POINTS, NULL, particle_batch_cache_ensure_edit_tip_pos(), and particle_batch_cache_get().
Referenced by DRW_cache_particles_get_edit_tip_points().
GPUBatch* DRW_particles_batch_cache_get_hair | ( | Object * | object, |
ParticleSystem * | psys, | ||
ModifierData * | md | ||
) |
Definition at line 1484 of file draw_cache_impl_particles.c.
References drw_particle_get_hair_source(), drw_particle_update_ptcache(), ParticleDrawSource::edit, ensure_seg_pt_count(), GPU_batch_create, GPU_PRIM_LINE_STRIP, ParticleBatchCache::hair, ParticleHairCache::hairs, ParticleHairCache::indices, ParticleDrawSource::md, NULL, particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_get(), ParticleHairCache::pos, and ParticleDrawSource::psys.
Referenced by DRW_cache_particles_get_hair().
|
static |
Definition at line 93 of file draw_cache_impl_particles.c.
References GPUVertFormat::attr_len, GPU_COMP_F32, GPU_FETCH_FLOAT, and GPU_vertformat_attr_add().
Referenced by particle_batch_cache_ensure_edit_inner_pos(), particle_batch_cache_ensure_edit_pos_and_seg(), and particle_batch_cache_ensure_edit_tip_pos().
|
static |
Definition at line 1571 of file draw_cache_impl_particles.c.
References BLI_assert, ParticleBatchCache::edit_inner_point_len, ParticleBatchCache::edit_inner_pos, NULL, PEP_HIDE, point, point_index, PTCacheEdit::points, and PTCacheEdit::totpoint.
Referenced by DRW_particles_batch_cache_get_edit_inner_points().
|
static |
Definition at line 1631 of file draw_cache_impl_particles.c.
References ParticleBatchCache::edit_tip_point_len, ParticleBatchCache::edit_tip_pos, NULL, PEP_HIDE, point, point_index, PTCacheEdit::points, and PTCacheEdit::totpoint.
Referenced by DRW_particles_batch_cache_get_edit_tip_points().
|
static |
Definition at line 258 of file draw_cache_impl_particles.c.
References ParticleSystem::childcache, count_cache_segment_keys(), ParticleSettings::disp, ParticleSettings::draw, ParticleHairCache::elems_len, ParticleHairCache::indices, NULL, ParticleSystem::part, PART_DRAW_PARENT, PTCacheEdit::pathcache, ParticleSystem::pathcache, ParticleHairCache::point_len, ParticleHairCache::pos, ParticleHairCache::proc_point_buf, ParticleHairCache::strands_len, PTCacheEdit::totcached, ParticleSystem::totchild, and ParticleSystem::totpart.
Referenced by DRW_particles_batch_cache_get_edit_strands(), DRW_particles_batch_cache_get_hair(), and particles_ensure_procedural_data().
|
static |
Definition at line 205 of file draw_cache_impl_particles.c.
References ParticleSystem::batch_cache, ParticleBatchCache::edit_hair, ParticleBatchCache::edit_inner_points, ParticleBatchCache::edit_inner_pos, ParticleBatchCache::edit_tip_points, ParticleBatchCache::edit_tip_pos, GPU_BATCH_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, ParticleBatchCache::hair, particle_batch_cache_clear_hair(), particle_batch_cache_clear_point(), and ParticleBatchCache::point.
Referenced by DRW_particle_batch_cache_free(), and particle_batch_cache_get().
|
static |
Definition at line 169 of file draw_cache_impl_particles.c.
References ParticleHairCache::col_tex, DRW_TEXTURE_FREE_SAFE, ParticleHairCache::final, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, ParticleHairCache::hairs, ParticleHairCache::indices, ParticleHairCache::length_tex, MAX_HAIR_SUBDIV, MAX_MTFACE, MAX_THICKRES, ParticleHairCache::num_col_layers, ParticleHairCache::point_tex, ParticleHairCache::pos, ParticleHairFinalCache::proc_buf, ParticleHairCache::proc_col_buf, ParticleHairFinalCache::proc_hairs, ParticleHairCache::proc_length_buf, ParticleHairCache::proc_point_buf, ParticleHairCache::proc_strand_buf, ParticleHairCache::proc_strand_seg_buf, ParticleHairFinalCache::proc_tex, ParticleHairCache::proc_uv_buf, ParticleHairCache::strand_seg_tex, ParticleHairCache::strand_tex, and ParticleHairCache::uv_tex.
Referenced by particle_batch_cache_clear().
|
static |
Definition at line 163 of file draw_cache_impl_particles.c.
References GPU_BATCH_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, ParticlePointCache::points, and ParticlePointCache::pos.
Referenced by particle_batch_cache_clear().
|
static |
Definition at line 1587 of file draw_cache_impl_particles.c.
References color, ParticleBatchCache::edit_inner_point_len, ParticleBatchCache::edit_inner_pos, edit_points_vert_format_get(), PTCacheEditKey::flag, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, PEK_SELECT, PEP_HIDE, point, point_index, PTCacheEdit::points, PTCacheEdit::totpoint, and PTCacheEditKey::world_co.
Referenced by DRW_particles_batch_cache_get_edit_inner_points().
|
static |
Definition at line 1513 of file draw_cache_impl_particles.c.
References BLI_assert_msg, edit_points_vert_format_get(), ParticleHairCache::elems_len, GPU_indexbuf_build(), GPU_INDEXBUF_DISCARD_SAFE, GPU_indexbuf_init_ex(), GPU_PRIM_LINE_STRIP, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_VERTBUF_DISCARD_SAFE, ParticleHairCache::indices, NULL, particle_batch_cache_fill_segments_edit(), ParticleSystem::particles, PTCacheEdit::pathcache, ParticleHairCache::point_len, ParticleHairCache::pos, and PTCacheEdit::totcached.
Referenced by DRW_particles_batch_cache_get_edit_strands().
|
static |
Definition at line 1646 of file draw_cache_impl_particles.c.
References color, edit_points_vert_format_get(), ParticleBatchCache::edit_tip_point_len, ParticleBatchCache::edit_tip_pos, PTCacheEditKey::flag, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, PEK_SELECT, PEP_HIDE, point, point_index, PTCacheEdit::points, PTCacheEdit::totpoint, and PTCacheEditKey::world_co.
Referenced by DRW_particles_batch_cache_get_edit_tip_points().
|
static |
Definition at line 1347 of file draw_cache_impl_particles.c.
References ParticleSettings::color_vec_max, DEG_get_ctime(), ParticleSimulationData::depsgraph, DRWContextState::depsgraph, ParticleSettings::draw_col, DRW_context_state_get(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_data_resize(), GPU_VERTBUF_DISCARD_SAFE, GPU_vertformat_attr_add(), len_v3(), len_v3v3(), NULL, ParticleSimulationData::ob, ParticleSystem::part, PART_DRAW_COL_ACC, PART_DRAW_COL_VEL, ParticleSystem::particles, ParticlePointCache::pos, ParticleData::prev_state, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_get_modifier(), psys_get_particle_state(), psys_sim_data_free(), psys_sim_data_init(), ParticleSimulationData::scene, DRWContextState::scene, state, ParticleKey::time, ParticleSystem::totpart, and ParticleKey::vel.
Referenced by DRW_particles_batch_cache_get_dots().
|
static |
Definition at line 1155 of file draw_cache_impl_particles.c.
References attr_id, BKE_mesh_tessface_ensure(), BLI_snprintf(), CD_MCOL, CD_MLOOPUV, CD_MTFACE, CD_PROP_BYTE_COLOR, ParticleSystem::childcache, CustomData_get_active_layer(), CustomData_get_layer_n(), CustomData_get_layer_name(), CustomData_has_layer(), CustomData_number_of_layers(), ParticleSettings::disp, ParticleSettings::draw, ParticleHairCache::elems_len, Mesh::fdata, float(), GPU_COMP_F32, GPU_COMP_I32, GPU_COMP_U16, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_indexbuf_build(), GPU_INDEXBUF_DISCARD_SAFE, GPU_indexbuf_init_ex(), GPU_MAX_SAFE_ATTR_NAME, GPU_PRIM_LINE_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_VERTBUF_DISCARD_SAFE, GPU_vertformat_alias_add(), GPU_vertformat_attr_add(), GPU_vertformat_clear(), GPU_vertformat_safe_attr_name(), ParticleHairCache::indices, Mesh::ldata, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, ParticleSystemModifierData::mesh_final, NULL, ParticleSystem::part, PART_DRAW_PARENT, particle_batch_cache_fill_segments(), PARTICLE_SOURCE_CHILDREN, PARTICLE_SOURCE_PARENT, PTCacheEdit::pathcache, ParticleSystem::pathcache, ParticleHairCache::point_len, ParticleHairCache::pos, PTCacheEdit::totcached, ParticleSystem::totchild, and ParticleSystem::totpart.
Referenced by DRW_particles_batch_cache_get_hair().
|
static |
Definition at line 804 of file draw_cache_impl_particles.c.
References ParticleHairCache::final, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_texture_create_from_vertbuf(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), ParticleHairFinalCache::proc_buf, ParticleHairFinalCache::proc_tex, ParticleHairCache::strands_len, and ParticleHairFinalCache::strands_res.
Referenced by particles_ensure_procedural_data().
|
static |
Definition at line 1042 of file draw_cache_impl_particles.c.
References BLI_assert, ParticleSystem::childcache, ParticleSettings::disp, ParticleSettings::draw, ParticleHairCache::final, GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_COMP_U8, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_indexbuf_build(), GPU_indexbuf_init_ex(), GPU_PRIM_LINE_STRIP, GPU_PRIM_TRI_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), GPU_vertformat_clear(), MAX_THICKRES, NULL, ParticleSystem::part, PART_DRAW_PARENT, particle_batch_cache_fill_segments_indices(), PTCacheEdit::pathcache, ParticleSystem::pathcache, ParticleHairFinalCache::proc_hairs, ParticleHairCache::strands_len, ParticleHairFinalCache::strands_res, PTCacheEdit::totcached, ParticleSystem::totchild, and ParticleSystem::totpart.
Referenced by particles_ensure_procedural_data().
|
static |
Definition at line 1093 of file draw_cache_impl_particles.c.
References CD_HAIRLENGTH, ParticleSystem::childcache, ParticleSettings::disp, ParticleSettings::draw, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_material_attributes(), GPU_texture_create_from_vertbuf(), GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), ParticleHairCache::length_tex, LISTBASE_FOREACH, NULL, ParticleSystem::part, PART_DRAW_PARENT, particle_batch_cache_fill_segments_proc_pos(), PTCacheEdit::pathcache, ParticleSystem::pathcache, ParticleHairCache::point_len, ParticleHairCache::point_tex, ParticleHairCache::proc_length_buf, ParticleHairCache::proc_point_buf, ParticleHairCache::strands_len, PTCacheEdit::totcached, ParticleSystem::totchild, and ParticleSystem::totpart.
Referenced by particles_ensure_procedural_data().
|
static |
Definition at line 825 of file draw_cache_impl_particles.c.
References BKE_mesh_tessface_ensure(), BLI_array_alloca, BLI_snprintf(), BLI_strncpy(), CD_MCOL, CD_MLOOPUV, CD_MTFACE, CD_PROP_BYTE_COLOR, ParticleSystem::childcache, ParticleHairCache::col_layer_names, ParticleHairCache::col_tex, CustomData_get_active_layer(), CustomData_get_layer_n(), CustomData_get_layer_name(), CustomData_get_render_layer(), CustomData_has_layer(), CustomData_number_of_layers(), ParticleSettings::disp, ParticleSettings::draw, Mesh::fdata, float(), GPU_COMP_F32, GPU_COMP_U16, GPU_COMP_U32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_MAX_SAFE_ATTR_NAME, GPU_texture_create_from_vertbuf(), GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), GPU_vertformat_safe_attr_name(), Mesh::ldata, MAX_LAYER_NAME_LEN, MAX_MTFACE, MEM_calloc_arrayN, MEM_freeN, MEM_SAFE_FREE, ParticleSystemModifierData::mesh_final, NULL, ParticleHairCache::num_col_layers, ParticleHairCache::num_uv_layers, ParticleSystem::part, PART_DRAW_PARENT, particle_batch_cache_fill_strands_data(), PARTICLE_SOURCE_CHILDREN, PARTICLE_SOURCE_PARENT, PTCacheEdit::pathcache, ParticleSystem::pathcache, ParticleHairCache::proc_col_buf, ParticleHairCache::proc_strand_buf, ParticleHairCache::proc_strand_seg_buf, ParticleHairCache::proc_uv_buf, ParticleHairCache::strand_seg_tex, ParticleHairCache::strand_tex, ParticleHairCache::strands_len, PTCacheEdit::totcached, ParticleSystem::totchild, ParticleSystem::totpart, ParticleHairCache::uv_layer_names, and ParticleHairCache::uv_tex.
Referenced by particles_ensure_procedural_data().
|
static |
Definition at line 494 of file draw_cache_impl_particles.c.
References attr_id, ParticleSystem::child, ParticleSettings::childtype, ParticleCacheKey::co, float(), GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), GPU_vertbuf_attr_set(), is_child(), MEM_callocN, MEM_freeN, NULL, ChildParticle::parent, ParticleSystem::part, PART_CHILD_PARTICLES, particle_calculate_mcol(), particle_calculate_uvs(), particle_pack_mcol(), PARTICLE_SOURCE_CHILDREN, ParticleHairCache::pos, ParticleCacheKey::segments, sub_v3_v3v3(), and ParticleSystem::totpart.
Referenced by particle_batch_cache_ensure_pos_and_seg().
|
static |
Definition at line 667 of file draw_cache_impl_particles.c.
References ParticleCacheKey::co, ParticleCacheKey::col, EditStrandData::color, copy_v3_v3(), float(), GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), GPU_vertbuf_raw_step(), particle_key_weight(), EditStrandData::pos, and ParticleCacheKey::segments.
Referenced by particle_batch_cache_ensure_edit_pos_and_seg().
|
static |
Definition at line 704 of file draw_cache_impl_particles.c.
References GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), and ParticleCacheKey::segments.
Referenced by particle_batch_cache_ensure_procedural_indices().
|
static |
Definition at line 615 of file draw_cache_impl_particles.c.
References ParticleCacheKey::co, copy_v3_v3(), GPU_vertbuf_raw_step(), len_v3v3(), NULL, and ParticleCacheKey::segments.
Referenced by particle_batch_cache_ensure_procedural_pos().
|
static |
Definition at line 724 of file draw_cache_impl_particles.c.
References ParticleSystem::child, ParticleSettings::childtype, copy_v2_v2(), float(), GPU_vertbuf_raw_step(), is_child(), MEM_callocN, MEM_freeN, NULL, ChildParticle::parent, ParticleSystem::part, PART_CHILD_PARTICLES, particle_calculate_mcol(), particle_calculate_uvs(), particle_pack_mcol(), PARTICLE_SOURCE_CHILDREN, ParticleCacheKey::segments, and ParticleSystem::totpart.
Referenced by particle_batch_cache_ensure_procedural_strand_data().
|
static |
Definition at line 223 of file draw_cache_impl_particles.c.
References ParticleHairCache::col_layer_names, ParticleHairCache::col_tex, MEM_SAFE_FREE, and ParticleHairCache::proc_col_buf.
Referenced by DRW_particle_batch_cache_free().
|
static |
Definition at line 139 of file draw_cache_impl_particles.c.
References ParticleSystem::batch_cache, particle_batch_cache_clear(), particle_batch_cache_init(), and particle_batch_cache_valid().
Referenced by 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(), and particles_ensure_procedural_data().
|
static |
Definition at line 125 of file draw_cache_impl_particles.c.
References ParticleSystem::batch_cache, ParticleBatchCache::is_dirty, and MEM_callocN.
Referenced by particle_batch_cache_get().
|
static |
Definition at line 108 of file draw_cache_impl_particles.c.
References ParticleSystem::batch_cache, ParticleBatchCache::is_dirty, and NULL.
Referenced by particle_batch_cache_get().
|
static |
Definition at line 446 of file draw_cache_impl_particles.c.
References ParticleSystem::child, MEM_callocN, NULL, ChildParticle::parent, particle_calculate_parent_mcol(), and particle_interpolate_children_mcol().
Referenced by particle_batch_cache_fill_segments(), and particle_batch_cache_fill_strands_data().
|
static |
Definition at line 323 of file draw_cache_impl_particles.c.
References DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, ParticleSettings::from, ParticleData::fuv, ParticleSystemModifierData::mesh_final, Mesh::mface, NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSystem::part, PART_FROM_FACE, PART_FROM_VOLUME, ParticleSystem::particles, ParticleSystemModifierData::psys, psys_interpolate_mcol(), Mesh::totface, and MFace::v4.
Referenced by particle_calculate_mcol().
|
static |
Definition at line 294 of file draw_cache_impl_particles.c.
References DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ELEM, ParticleSettings::from, ParticleData::fuv, ParticleSystemModifierData::mesh_final, Mesh::mface, NULL, ParticleData::num, ParticleData::num_dmcache, ParticleSystem::part, PART_FROM_FACE, PART_FROM_VOLUME, ParticleSystem::particles, ParticleSystemModifierData::psys, psys_interpolate_uvs(), Mesh::totface, and MFace::v4.
Referenced by particle_calculate_uvs().
|
static |
Definition at line 403 of file draw_cache_impl_particles.c.
References ParticleSystem::child, MEM_callocN, NULL, ChildParticle::parent, particle_calculate_parent_uvs(), and particle_interpolate_children_uvs().
Referenced by particle_batch_cache_fill_segments(), and particle_batch_cache_fill_strands_data().
|
static |
Definition at line 378 of file draw_cache_impl_particles.c.
References ParticleSystem::child, DMCACHE_NOTFOUND, ELEM, ParticleSettings::from, ChildParticle::fuv, ParticleSystemModifierData::mesh_final, Mesh::mface, NULL, ChildParticle::num, ParticleSystem::part, PART_FROM_FACE, PART_FROM_VOLUME, ParticleSystemModifierData::psys, psys_interpolate_mcol(), and MFace::v4.
Referenced by particle_calculate_mcol().
|
static |
Definition at line 354 of file draw_cache_impl_particles.c.
References ParticleSystem::child, DMCACHE_NOTFOUND, ELEM, ParticleSettings::from, ChildParticle::fuv, ParticleSystemModifierData::mesh_final, Mesh::mface, NULL, ChildParticle::num, ParticleSystem::part, PART_FROM_FACE, PART_FROM_VOLUME, ParticleSystemModifierData::psys, psys_interpolate_uvs(), and MFace::v4.
Referenced by particle_calculate_uvs().
|
static |
Definition at line 650 of file draw_cache_impl_particles.c.
References floorf, ParticleData::hair, interp(), t, ParticleData::totkey, and HairKey::weight.
Referenced by particle_batch_cache_fill_segments_edit().
Definition at line 285 of file draw_cache_impl_particles.c.
References MCol::b, BLI_color_from_srgb_table, MCol::g, MCol::r, and unit_float_to_ushort_clamp().
Referenced by particle_batch_cache_fill_segments(), and particle_batch_cache_fill_strands_data().
bool particles_ensure_procedural_data | ( | struct Object * | object, |
struct ParticleSystem * | psys, | ||
struct ModifierData * | md, | ||
struct ParticleHairCache ** | r_hair_cache, | ||
struct GPUMaterial * | gpu_material, | ||
int | subdiv, | ||
int | thickness_res | ||
) |
Ensure all textures and buffers needed for GPU accelerated drawing.
Definition at line 1688 of file draw_cache_impl_particles.c.
References ParticleSettings::draw_step, drw_particle_get_hair_source(), drw_particle_update_ptcache(), ParticleDrawSource::edit, ensure_seg_pt_count(), ParticleHairCache::final, ParticleBatchCache::hair, ParticleDrawSource::md, NULL, ParticleSystem::part, particle_batch_cache_ensure_procedural_final_points(), particle_batch_cache_ensure_procedural_indices(), particle_batch_cache_ensure_procedural_pos(), particle_batch_cache_ensure_procedural_strand_data(), particle_batch_cache_get(), ParticleDrawSource::psys, and ParticleHairFinalCache::strands_res.
Referenced by drw_hair_particle_cache_get().