|
Blender
V2.93
|
DispList API for render engines. More...
#include "BLI_alloca.h"#include "BLI_edgehash.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "DNA_curve_types.h"#include "DNA_scene_types.h"#include "BKE_displist.h"#include "BKE_displist_tangent.h"#include "GPU_batch.h"#include "GPU_capabilities.h"#include "draw_cache_inline.h"#include "draw_cache_impl.h"Go to the source code of this file.
Macros | |
| #define | SURFACE_QUAD_ITER_BEGIN(dl) |
| #define | SURFACE_QUAD_ITER_END |
| #define | NO_EDGE INT_MAX |
Typedefs | |
| typedef void() | SetTriIndicesFn(void *thunk, uint v1, uint v2, uint v3) |
DispList API for render engines.
Definition in file draw_cache_impl_displist.c.
| #define NO_EDGE INT_MAX |
Definition at line 778 of file draw_cache_impl_displist.c.
| #define SURFACE_QUAD_ITER_BEGIN | ( | dl | ) |
Definition at line 436 of file draw_cache_impl_displist.c.
| #define SURFACE_QUAD_ITER_END |
Definition at line 459 of file draw_cache_impl_displist.c.
Definition at line 91 of file draw_cache_impl_displist.c.
|
static |
Definition at line 82 of file draw_cache_impl_displist.c.
References dl_tri_len(), and LISTBASE_FOREACH.
Referenced by DRW_displist_indexbuf_create_edges_adjacency_lines(), DRW_displist_indexbuf_create_lines_in_order(), DRW_displist_indexbuf_create_triangles_in_order(), DRW_displist_indexbuf_create_triangles_loop_split_by_material(), and DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan().
|
static |
Definition at line 73 of file draw_cache_impl_displist.c.
References dl_vert_len(), and LISTBASE_FOREACH.
Referenced by DRW_displist_indexbuf_create_edges_adjacency_lines(), DRW_displist_indexbuf_create_lines_in_order(), DRW_displist_indexbuf_create_triangles_in_order(), DRW_displist_vertbuf_create_pos_and_nor(), and DRW_displist_vertbuf_create_wiredata().
|
static |
Definition at line 93 of file draw_cache_impl_displist.c.
References BLI_assert, DL_INDEX3, DL_INDEX4, DL_SURF, ELEM, DispList::index, DispList::parts, DispList::totindex, and DispList::type.
Referenced by DRW_displist_indexbuf_create_edges_adjacency_lines(), DRW_displist_indexbuf_create_lines_in_order(), and DRW_displist_indexbuf_create_triangles_in_order().
|
static |
Definition at line 131 of file draw_cache_impl_displist.c.
References Freestyle::a, BLI_assert, DL_CYCL_U, DL_CYCL_V, DL_INDEX3, DL_INDEX4, DL_SURF, ELEM, DispList::flag, DispList::index, DispList::nr, DispList::parts, and DispList::type.
Referenced by DRW_displist_indexbuf_create_triangles_loop_split_by_material().
Definition at line 468 of file draw_cache_impl_displist.c.
References DL_CYCL_U, DL_CYCL_V, DispList::flag, float(), MEM_mallocN, normal_quad_v3(), DispList::nr, DispList::parts, quad, SURFACE_QUAD_ITER_BEGIN, SURFACE_QUAD_ITER_END, DispList::verts, and verts.
Referenced by DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan().
|
static |
Definition at line 384 of file draw_cache_impl_displist.c.
References copy_v3_v3_short(), GPU_vertbuf_raw_step(), GPUNormal::high, and GPUNormal::low.
Referenced by displist_vertbuf_attr_set_tri_pos_nor_uv().
|
static |
Definition at line 402 of file draw_cache_impl_displist.c.
References copy_v3_v3(), displist_vertbuf_attr_set_nor(), GPU_vertbuf_raw_step(), normal_float_to_short_v2(), GPUVertBufRaw::size, v1, and v2.
Referenced by DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan().
|
static |
Definition at line 59 of file draw_cache_impl_displist.c.
References DL_INDEX3, DL_INDEX4, DL_SURF, DispList::parts, DispList::totindex, and DispList::type.
Referenced by curve_render_surface_tri_len_get().
|
static |
Definition at line 47 of file draw_cache_impl_displist.c.
References DL_INDEX3, DL_INDEX4, DL_SURF, DispList::nr, DispList::parts, and DispList::type.
Referenced by curve_render_surface_vert_len_get(), DRW_displist_indexbuf_create_edges_adjacency_lines(), DRW_displist_indexbuf_create_lines_in_order(), DRW_displist_indexbuf_create_triangles_in_order(), and DRW_displist_vertbuf_create_pos_and_nor().
| void DRW_displist_indexbuf_create_edges_adjacency_lines | ( | struct ListBase * | lb, |
| struct GPUIndexBuf * | ibo, | ||
| bool * | r_is_manifold | ||
| ) |
Definition at line 822 of file draw_cache_impl_displist.c.
References abs(), BLI_edgehash_free(), BLI_edgehash_new_ex(), BLI_edgehashIterator_free(), BLI_edgehashIterator_getKey(), BLI_edgehashIterator_getValue(), BLI_edgehashIterator_isDone(), BLI_edgehashIterator_new(), BLI_edgehashIterator_step(), curve_render_surface_tri_len_get(), curve_render_surface_vert_len_get(), displist_indexbufbuilder_set(), dl_vert_len(), GPU_indexbuf_add_line_adj_verts(), GPU_indexbuf_build_in_place(), GPU_indexbuf_init(), GPU_PRIM_LINES_ADJ, LISTBASE_FOREACH, NO_EDGE, NULL, POINTER_AS_INT, set_edges_adjacency_lines_indices(), SWAP, v1, and v2.
Referenced by DRW_curve_batch_cache_create_requested(), and mball_batch_cache_get_edges_adj_lines().
| void DRW_displist_indexbuf_create_lines_in_order | ( | ListBase * | lb, |
| GPUIndexBuf * | ibo | ||
| ) |
Definition at line 336 of file draw_cache_impl_displist.c.
References curve_render_surface_tri_len_get(), curve_render_surface_vert_len_get(), displist_indexbufbuilder_set(), dl_vert_len(), GPU_indexbuf_build_in_place(), GPU_indexbuf_init(), GPU_PRIM_LINES, LISTBASE_FOREACH, set_overlay_wires_quad_tri_indices(), and set_overlay_wires_tri_indices().
Referenced by DRW_curve_batch_cache_create_requested(), and DRW_metaball_batch_cache_get_wireframes_face().
| void DRW_displist_indexbuf_create_triangles_in_order | ( | ListBase * | lb, |
| GPUIndexBuf * | ibo | ||
| ) |
Definition at line 271 of file draw_cache_impl_displist.c.
References curve_render_surface_tri_len_get(), curve_render_surface_vert_len_get(), displist_indexbufbuilder_set(), dl_vert_len(), GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build_in_place(), GPU_indexbuf_init(), GPU_PRIM_TRIS, and LISTBASE_FOREACH.
Referenced by DRW_curve_batch_cache_create_requested(), and DRW_metaball_batch_cache_get_triangles_with_normals().
| void DRW_displist_indexbuf_create_triangles_loop_split_by_material | ( | ListBase * | lb, |
| GPUIndexBuf ** | ibo_mats, | ||
| uint | mat_len | ||
| ) |
Definition at line 292 of file draw_cache_impl_displist.c.
References BLI_array_alloca, curve_render_surface_tri_len_get(), displist_indexbufbuilder_tess_set(), GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build_in_place(), GPU_indexbuf_init(), GPU_PRIM_TRIS, and LISTBASE_FOREACH.
Referenced by DRW_curve_batch_cache_create_requested().
| void DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan | ( | ListBase * | lb, |
| GPUVertBuf * | vbo_pos_nor, | ||
| GPUVertBuf * | vbo_uv, | ||
| GPUVertBuf * | vbo_tan, | ||
| const Scene * | scene | ||
| ) |
Definition at line 483 of file draw_cache_impl_displist.c.
References attr_id, GPUVertFormat::attr_len, BKE_displist_normals_add(), BKE_displist_tangent_calc(), BLI_assert, CU_SMOOTH, curve_render_surface_tri_len_get(), displist_surf_fnors_ensure(), displist_vertbuf_attr_set_tri_pos_nor_uv(), DL_INDEX3, DL_INDEX4, DL_SURF, DRW_TEST_ASSIGN_VBO, ELEM, float(), GPU_COMP_F32, GPU_COMP_I10, GPU_COMP_I16, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_normal_convert_v3(), GPU_use_hq_normals_workaround(), GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_data_alloc(), GPU_vertbuf_data_resize(), GPU_vertbuf_init_with_format, GPU_vertbuf_raw_used(), GPU_vertformat_alias_add(), GPU_vertformat_attr_add(), GPUNormal::high, if(), DispList::index, LISTBASE_FOREACH, GPUNormal::low, MEM_SAFE_FREE, nor, normal_float_to_short_v3(), normal_quad_v3(), normal_tri_v3(), DispList::nors, DispList::nr, NULL, DispList::parts, RenderData::perf_flag, pos, quad, Scene::r, DispList::rt, SCE_PERF_HQ_NORMALS, scene, GPUVertBufRaw::size, surf_uv_quad(), SURFACE_QUAD_ITER_BEGIN, SURFACE_QUAD_ITER_END, KDL::tan(), DispList::type, DispList::verts, and verts.
| void DRW_displist_vertbuf_create_pos_and_nor | ( | ListBase * | lb, |
| GPUVertBuf * | vbo, | ||
| const Scene * | scene | ||
| ) |
Definition at line 178 of file draw_cache_impl_displist.c.
References attr_id, BKE_displist_normals_add(), curve_render_surface_vert_len_get(), DL_INDEX3, DL_INDEX4, DL_SURF, dl_vert_len(), ELEM, GPU_COMP_F32, GPU_COMP_I10, GPU_COMP_I16, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_normal_convert_v3(), GPU_use_hq_normals_workaround(), GPU_vertbuf_attr_set(), GPU_vertbuf_data_alloc(), GPU_vertbuf_init_with_format, GPU_vertformat_attr_add(), LISTBASE_FOREACH, nor, RenderData::perf_flag, pos, Scene::r, SCE_PERF_HQ_NORMALS, and scene.
| void DRW_displist_vertbuf_create_wiredata | ( | ListBase * | lb, |
| GPUVertBuf * | vbo | ||
| ) |
Definition at line 265 of file draw_cache_impl_displist.c.
References curve_render_surface_vert_len_get(), and DRW_vertbuf_create_wiredata().
Referenced by DRW_curve_batch_cache_create_requested(), and DRW_metaball_batch_cache_get_wireframes_face().
| void DRW_vertbuf_create_wiredata | ( | GPUVertBuf * | vbo, |
| const int | vert_len | ||
| ) |
Definition at line 232 of file draw_cache_impl_displist.c.
References attr_id, GPU_COMP_F32, GPU_COMP_U8, GPU_crappy_amd_driver(), GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_data_alloc(), GPU_vertbuf_get_data(), GPU_vertbuf_get_format(), GPU_vertbuf_init_with_format, GPU_vertbuf_raw_step(), GPU_vertformat_attr_add(), and stride.
Referenced by DRW_displist_vertbuf_create_wiredata(), and drw_volume_wireframe_cb().
|
static |
Definition at line 779 of file draw_cache_impl_displist.c.
References abs(), BLI_edgehash_ensure_p(), GPU_indexbuf_add_line_adj_verts(), NO_EDGE, POINTER_AS_INT, POINTER_FROM_INT, v1, and v2.
Referenced by set_edges_adjacency_lines_indices().
Definition at line 810 of file draw_cache_impl_displist.c.
References set_edge_adjacency_lines_indices(), v1, and v2.
Referenced by DRW_displist_indexbuf_create_edges_adjacency_lines().
Definition at line 329 of file draw_cache_impl_displist.c.
References GPU_indexbuf_add_line_verts(), v1, and v2.
Referenced by DRW_displist_indexbuf_create_lines_in_order().
Definition at line 321 of file draw_cache_impl_displist.c.
References GPU_indexbuf_add_line_verts(), v1, and v2.
Referenced by DRW_displist_indexbuf_create_lines_in_order().
Definition at line 354 of file draw_cache_impl_displist.c.
References DL_CYCL_U, DL_CYCL_V, DispList::flag, DispList::nr, DispList::parts, and quad.
Referenced by DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan().