Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_particles.c
| Show First 20 Lines • Show All 1,494 Lines • ▼ Show 20 Lines | static void particle_batch_cache_ensure_edit_pos_and_seg(PTCacheEdit *edit, | ||||
| GPU_indexbuf_init_ex(&elb, GPU_PRIM_LINE_STRIP, hair_cache->elems_len, hair_cache->point_len); | GPU_indexbuf_init_ex(&elb, GPU_PRIM_LINE_STRIP, hair_cache->elems_len, hair_cache->point_len); | ||||
| if (edit != NULL && edit->pathcache != NULL) { | if (edit != NULL && edit->pathcache != NULL) { | ||||
| particle_batch_cache_fill_segments_edit( | particle_batch_cache_fill_segments_edit( | ||||
| edit, particle, edit->pathcache, 0, edit->totcached, &elb, &data_step); | edit, particle, edit->pathcache, 0, edit->totcached, &elb, &data_step); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_assert(!"Hairs are not in edit mode!"); | BLI_assert_msg(0, "Hairs are not in edit mode!"); | ||||
| } | } | ||||
| hair_cache->indices = GPU_indexbuf_build(&elb); | hair_cache->indices = GPU_indexbuf_build(&elb); | ||||
| } | } | ||||
| GPUBatch *DRW_particles_batch_cache_get_edit_strands(Object *object, | GPUBatch *DRW_particles_batch_cache_get_edit_strands(Object *object, | ||||
| ParticleSystem *psys, | ParticleSystem *psys, | ||||
| PTCacheEdit *edit, | PTCacheEdit *edit, | ||||
| bool use_weight) | bool use_weight) | ||||
| ▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines | |||||