|
Blender
V2.93
|
Hair API for render engines. More...
#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_math_base.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "DNA_hair_types.h"#include "DNA_object_types.h"#include "BKE_hair.h"#include "GPU_batch.h"#include "GPU_texture.h"#include "draw_cache_impl.h"#include "draw_hair_private.h"Go to the source code of this file.
Classes | |
| struct | HairBatchCache |
Typedefs | |
| typedef struct HairBatchCache | HairBatchCache |
Hair API for render engines.
Definition in file draw_cache_impl_hair.c.
| typedef struct HairBatchCache HairBatchCache |
| void DRW_hair_batch_cache_dirty_tag | ( | Hair * | hair, |
| int | mode | ||
| ) |
Definition at line 93 of file draw_cache_impl_hair.c.
References Hair::batch_cache, BKE_HAIR_BATCH_DIRTY_ALL, BLI_assert, HairBatchCache::is_dirty, and NULL.
Referenced by DRW_engines_register().
| void DRW_hair_batch_cache_free | ( | Hair * | hair | ) |
Definition at line 118 of file draw_cache_impl_hair.c.
References Hair::batch_cache, hair_batch_cache_clear(), and MEM_SAFE_FREE.
Referenced by DRW_engines_register().
| void DRW_hair_batch_cache_validate | ( | Hair * | hair | ) |
Definition at line 79 of file draw_cache_impl_hair.c.
References hair_batch_cache_clear(), hair_batch_cache_init(), and hair_batch_cache_valid().
Referenced by drw_batch_cache_validate(), and hair_batch_cache_get().
| int DRW_hair_material_count_get | ( | Hair * | hair | ) |
Definition at line 348 of file draw_cache_impl_hair.c.
References max_ii(), and Hair::totcol.
Referenced by DRW_cache_object_material_count_get().
|
static |
Definition at line 124 of file draw_cache_impl_hair.c.
References curve, Hair::curves, ParticleHairCache::elems_len, ParticleHairCache::indices, NULL, ParticleHairCache::point_len, ParticleHairCache::pos, ParticleHairCache::proc_point_buf, ParticleHairCache::strands_len, and Hair::totcurve.
Referenced by hair_ensure_procedural_data().
|
static |
Definition at line 108 of file draw_cache_impl_hair.c.
References Hair::batch_cache, HairBatchCache::hair, and particle_batch_cache_clear_hair().
Referenced by DRW_hair_batch_cache_free(), and DRW_hair_batch_cache_validate().
|
static |
Definition at line 240 of file draw_cache_impl_hair.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 hair_ensure_procedural_data().
|
static |
Definition at line 275 of file draw_cache_impl_hair.c.
References BLI_assert, 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(), hair_batch_cache_fill_segments_indices(), MAX_THICKRES, NULL, ParticleHairFinalCache::proc_hairs, ParticleHairCache::strands_len, and ParticleHairFinalCache::strands_res.
Referenced by hair_ensure_procedural_data().
|
static |
Definition at line 174 of file draw_cache_impl_hair.c.
References GPU_COMP_F32, GPU_FETCH_FLOAT, 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(), hair_batch_cache_fill_segments_proc_pos(), NULL, ParticleHairCache::point_len, ParticleHairCache::point_tex, and ParticleHairCache::proc_point_buf.
Referenced by hair_ensure_procedural_data().
|
static |
Definition at line 210 of file draw_cache_impl_hair.c.
References GPU_COMP_U16, GPU_COMP_U32, GPU_FETCH_INT, 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(), hair_batch_cache_fill_strands_data(), ParticleHairCache::proc_strand_buf, ParticleHairCache::proc_strand_seg_buf, ParticleHairCache::strand_seg_tex, ParticleHairCache::strand_tex, and ParticleHairCache::strands_len.
Referenced by hair_ensure_procedural_data().
|
static |
Definition at line 260 of file draw_cache_impl_hair.c.
References curve, Hair::curves, GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), and Hair::totcurve.
Referenced by hair_batch_cache_ensure_procedural_indices().
|
static |
Definition at line 144 of file draw_cache_impl_hair.c.
References Hair::co, copy_v3_v3(), curve, Hair::curves, float(), GPU_vertbuf_raw_step(), len_v3v3(), NULL, and Hair::totcurve.
Referenced by hair_batch_cache_ensure_procedural_pos().
|
static |
Definition at line 198 of file draw_cache_impl_hair.c.
References curve, Hair::curves, GPU_vertbuf_raw_step(), and Hair::totcurve.
Referenced by hair_batch_cache_ensure_procedural_strand_data().
|
static |
Definition at line 87 of file draw_cache_impl_hair.c.
References Hair::batch_cache, and DRW_hair_batch_cache_validate().
Referenced by hair_ensure_procedural_data().
|
static |
Definition at line 65 of file draw_cache_impl_hair.c.
References Hair::batch_cache, HairBatchCache::is_dirty, and MEM_callocN.
Referenced by DRW_hair_batch_cache_validate().
|
static |
Definition at line 59 of file draw_cache_impl_hair.c.
References Hair::batch_cache, and HairBatchCache::is_dirty.
Referenced by DRW_hair_batch_cache_validate().
| bool hair_ensure_procedural_data | ( | Object * | object, |
| ParticleHairCache ** | r_hair_cache, | ||
| int | subdiv, | ||
| int | thickness_res | ||
| ) |
Definition at line 310 of file draw_cache_impl_hair.c.
References ensure_seg_pt_count(), HairBatchCache::hair, hair_batch_cache_ensure_procedural_final_points(), hair_batch_cache_ensure_procedural_indices(), hair_batch_cache_ensure_procedural_pos(), hair_batch_cache_ensure_procedural_strand_data(), hair_batch_cache_get(), NULL, and steps.
Referenced by drw_hair_particle_cache_get().