|
Blender
V2.93
|
MetaBall API for render engines. More...
#include "MEM_guardedalloc.h"#include "BLI_math_base.h"#include "BLI_utildefines.h"#include "DNA_meta_types.h"#include "DNA_object_types.h"#include "BKE_curve.h"#include "BKE_mball.h"#include "GPU_batch.h"#include "DRW_render.h"#include "draw_cache_impl.h"Go to the source code of this file.
Classes | |
| struct | MetaBallBatchCache |
Typedefs | |
| typedef struct MetaBallBatchCache | MetaBallBatchCache |
MetaBall API for render engines.
Definition in file draw_cache_impl_metaball.c.
| typedef struct MetaBallBatchCache MetaBallBatchCache |
| void DRW_mball_batch_cache_dirty_tag | ( | MetaBall * | mb, |
| int | mode | ||
| ) |
Definition at line 116 of file draw_cache_impl_metaball.c.
References MetaBall::batch_cache, BKE_MBALL_BATCH_DIRTY_ALL, BLI_assert, MetaBallBatchCache::is_dirty, and NULL.
Referenced by DRW_engines_register().
| void DRW_mball_batch_cache_free | ( | MetaBall * | mb | ) |
Definition at line 149 of file draw_cache_impl_metaball.c.
References MetaBall::batch_cache, MEM_SAFE_FREE, and metaball_batch_cache_clear().
Referenced by DRW_engines_register().
| struct GPUVertBuf* DRW_mball_batch_cache_pos_vertbuf_get | ( | Object * | ob | ) |
Definition at line 288 of file draw_cache_impl_metaball.c.
References BKE_mball_is_basis(), Object::data, DRW_context_state_get(), mball_batch_cache_get_pos_and_normals(), metaball_batch_cache_get(), NULL, scene, and DRWContextState::scene.
Referenced by DRW_cache_object_pos_vertbuf_get().
| void DRW_mball_batch_cache_validate | ( | MetaBall * | mb | ) |
Definition at line 103 of file draw_cache_impl_metaball.c.
References metaball_batch_cache_clear(), metaball_batch_cache_init(), and metaball_batch_cache_valid().
Referenced by drw_batch_cache_validate().
| struct GPUBatch* DRW_metaball_batch_cache_get_edge_detection | ( | struct Object * | ob, |
| bool * | r_is_manifold | ||
| ) |
Definition at line 262 of file draw_cache_impl_metaball.c.
References BKE_mball_is_basis(), Object::data, DRW_context_state_get(), MetaBallBatchCache::edge_detection, GPU_batch_create, GPU_PRIM_LINES_ADJ, MetaBallBatchCache::is_manifold, mball_batch_cache_get_edges_adj_lines(), mball_batch_cache_get_pos_and_normals(), metaball_batch_cache_get(), NULL, scene, and DRWContextState::scene.
Referenced by DRW_cache_mball_edge_detection_get().
| GPUBatch** DRW_metaball_batch_cache_get_surface_shaded | ( | Object * | ob, |
| MetaBall * | mb, | ||
| struct GPUMaterial ** | UNUSEDgpumat_array, | ||
| uint | gpumat_array_len | ||
| ) |
Definition at line 206 of file draw_cache_impl_metaball.c.
References BKE_mball_is_basis(), BLI_assert, DRW_metaball_batch_cache_get_triangles_with_normals(), DRW_metaball_material_count_get(), MetaBallBatchCache::mat_len, MEM_callocN, metaball_batch_cache_get(), NULL, and MetaBallBatchCache::shaded_triangles.
Definition at line 182 of file draw_cache_impl_metaball.c.
References MetaBallBatchCache::batch, BKE_mball_is_basis(), Object_Runtime::curve_cache, Object::data, CurveCache::disp, DRW_context_state_get(), DRW_displist_indexbuf_create_triangles_in_order(), GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_indexbuf_calloc(), GPU_PRIM_TRIS, mball_batch_cache_get_pos_and_normals(), metaball_batch_cache_get(), NULL, Object::runtime, scene, and DRWContextState::scene.
Referenced by DRW_cache_mball_surface_get(), and DRW_metaball_batch_cache_get_surface_shaded().
Definition at line 230 of file draw_cache_impl_metaball.c.
References MetaBallBatchCache::batch, BKE_mball_is_basis(), Object_Runtime::curve_cache, Object::data, CurveCache::disp, DRW_context_state_get(), DRW_displist_indexbuf_create_lines_in_order(), DRW_displist_vertbuf_create_wiredata(), MetaBallBatchCache::face_wire, GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_batch_vertbuf_add_ex(), GPU_indexbuf_calloc(), GPU_PRIM_LINES, GPU_vertbuf_calloc(), mball_batch_cache_get_pos_and_normals(), metaball_batch_cache_get(), NULL, Object::runtime, scene, and DRWContextState::scene.
Referenced by DRW_cache_mball_face_wireframe_get().
| int DRW_metaball_material_count_get | ( | MetaBall * | mb | ) |
Definition at line 302 of file draw_cache_impl_metaball.c.
References max_ii(), and MetaBall::totcol.
Referenced by DRW_cache_object_material_count_get(), and DRW_metaball_batch_cache_get_surface_shaded().
|
static |
Definition at line 167 of file draw_cache_impl_metaball.c.
References Object_Runtime::curve_cache, CurveCache::disp, DRW_displist_indexbuf_create_edges_adjacency_lines(), MetaBallBatchCache::edges_adj_lines, GPU_indexbuf_calloc(), MetaBallBatchCache::is_manifold, NULL, and Object::runtime.
Referenced by DRW_metaball_batch_cache_get_edge_detection().
|
static |
Definition at line 155 of file draw_cache_impl_metaball.c.
References Object_Runtime::curve_cache, CurveCache::disp, DRW_displist_vertbuf_create_pos_and_nor(), GPU_vertbuf_calloc(), NULL, MetaBallBatchCache::pos_nor_in_order, Object::runtime, and scene.
Referenced by DRW_mball_batch_cache_pos_vertbuf_get(), DRW_metaball_batch_cache_get_edge_detection(), DRW_metaball_batch_cache_get_triangles_with_normals(), and DRW_metaball_batch_cache_get_wireframes_face().
|
static |
Definition at line 131 of file draw_cache_impl_metaball.c.
References MetaBallBatchCache::batch, MetaBall::batch_cache, MetaBallBatchCache::edge_detection, MetaBallBatchCache::edges_adj_lines, MetaBallBatchCache::face_wire, GPU_BATCH_DISCARD_SAFE, GPU_INDEXBUF_DISCARD_SAFE, GPU_VERTBUF_DISCARD_SAFE, MetaBallBatchCache::is_manifold, MetaBallBatchCache::mat_len, MEM_SAFE_FREE, MetaBallBatchCache::pos_nor_in_order, and MetaBallBatchCache::shaded_triangles.
Referenced by DRW_mball_batch_cache_free(), and DRW_mball_batch_cache_validate().
|
static |
Definition at line 111 of file draw_cache_impl_metaball.c.
References MetaBall::batch_cache.
Referenced by DRW_mball_batch_cache_pos_vertbuf_get(), DRW_metaball_batch_cache_get_edge_detection(), DRW_metaball_batch_cache_get_surface_shaded(), DRW_metaball_batch_cache_get_triangles_with_normals(), and DRW_metaball_batch_cache_get_wireframes_face().
|
static |
Definition at line 85 of file draw_cache_impl_metaball.c.
References MetaBallBatchCache::batch, MetaBall::batch_cache, MetaBallBatchCache::edge_detection, MetaBallBatchCache::edges_adj_lines, MetaBallBatchCache::face_wire, MetaBallBatchCache::is_dirty, MetaBallBatchCache::is_manifold, MetaBallBatchCache::mat_len, MEM_mallocN, NULL, MetaBallBatchCache::pos_nor_in_order, and MetaBallBatchCache::shaded_triangles.
Referenced by DRW_mball_batch_cache_validate().
|
static |
Definition at line 74 of file draw_cache_impl_metaball.c.
References MetaBall::batch_cache, MetaBallBatchCache::is_dirty, and NULL.
Referenced by DRW_mball_batch_cache_validate().