|
Blender
V2.93
|
Simple API to draw debug shapes in the viewport. More...
#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "BKE_object.h"#include "BLI_link_utils.h"#include "GPU_immediate.h"#include "draw_debug.h"#include "draw_manager.h"Go to the source code of this file.
Functions | |
| void | DRW_debug_modelmat_reset (void) |
| void | DRW_debug_modelmat (const float modelmat[4][4]) |
| void | DRW_debug_line_v3v3 (const float v1[3], const float v2[3], const float color[4]) |
| void | DRW_debug_polygon_v3 (const float(*v)[3], const int vert_len, const float color[4]) |
| void | DRW_debug_m4 (const float m[4][4]) |
| void | DRW_debug_bbox (const BoundBox *bbox, const float color[4]) |
| void | DRW_debug_m4_as_bbox (const float m[4][4], const float color[4], const bool invert) |
| void | DRW_debug_sphere (const float center[3], const float radius, const float color[4]) |
| static void | drw_debug_draw_lines (void) |
| static void | drw_debug_draw_spheres (void) |
| void | drw_debug_draw (void) |
| void | drw_debug_init (void) |
Variables | |
| static float | g_modelmat [4][4] |
Simple API to draw debug shapes in the viewport.
Definition in file draw_debug.c.
Definition at line 89 of file draw_debug.c.
References DRW_debug_line_v3v3(), and BoundBox::vec.
Referenced by DRW_debug_m4_as_bbox(), DRW_view_update(), sculpt_debug_cb(), and workbench_shadow_cache_populate().
| void drw_debug_draw | ( | void | ) |
Definition at line 221 of file draw_debug.c.
References drw_debug_draw_lines(), and drw_debug_draw_spheres().
Referenced by DRW_draw_callbacks_post_scene().
|
static |
Definition at line 142 of file draw_debug.c.
References BLI_linklist_count(), col, DRWDebugLine::color, count, DRWManager::debug, DST, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_FLAT_COLOR, GPU_vertformat_attr_add(), immAttr4fv(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex3fv(), immVertexFormat(), DRWManager::lines, MEM_freeN, DRWDebugLine::next, next, DRWDebugLine::pos, and pos.
Referenced by drw_debug_draw().
|
static |
Definition at line 175 of file draw_debug.c.
References BLI_linklist_count(), col, DRWDebugSphere::color, count, DRWManager::debug, DRW_cache_empty_sphere_get(), DRW_view_persmat_get(), DST, GPU_batch_create, GPU_batch_discard(), GPU_batch_draw(), GPU_batch_instbuf_set(), GPU_batch_program_set_builtin(), GPU_batch_uniform_mat4, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZE, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), GPUBatch, inst_vbo, DRWDebugSphere::mat, MEM_freeN, DRWDebugSphere::next, next, NULL, DRWManager::spheres, and v.
Referenced by drw_debug_draw().
| void drw_debug_init | ( | void | ) |
Definition at line 227 of file draw_debug.c.
References DRW_debug_modelmat_reset().
Referenced by DRW_draw_render_loop_2d_ex(), and DRW_draw_render_loop_ex().
Definition at line 53 of file draw_debug.c.
References BLI_LINKS_PREPEND, DRWDebugLine::color, copy_v4_v4(), DRWManager::debug, DST, g_modelmat, DRWManager::lines, MEM_mallocN, mul_v3_m4v3(), DRWDebugLine::pos, v1, and v2.
Referenced by DRW_debug_bbox(), DRW_debug_m4(), and DRW_debug_polygon_v3().
| void DRW_debug_m4 | ( | const float | m[4][4] | ) |
Definition at line 72 of file draw_debug.c.
References DRW_debug_line_v3v3(), mul_m4_v3(), v1, and v2.
Definition at line 107 of file draw_debug.c.
References BKE_boundbox_init_from_minmax(), copy_m4_m4(), DRW_debug_bbox(), invert(), invert_m4_m4(), max, min, mul_project_m4_v3(), and BoundBox::vec.
| void DRW_debug_modelmat | ( | const float | modelmat[4][4] | ) |
Definition at line 48 of file draw_debug.c.
References copy_m4_m4(), and g_modelmat.
Referenced by drw_sculpt_generate_calls().
| void DRW_debug_modelmat_reset | ( | void | ) |
Definition at line 43 of file draw_debug.c.
References g_modelmat, and unit_m4().
Referenced by drw_debug_init().
Definition at line 62 of file draw_debug.c.
References BLI_assert, DRW_debug_line_v3v3(), and v.
Definition at line 126 of file draw_debug.c.
References BLI_LINKS_PREPEND, center, DRWDebugSphere::color, copy_m4_m4(), copy_v4_v4(), DRWManager::debug, DST, g_modelmat, DRWDebugSphere::mat, MEM_mallocN, mul_m4_m4m4(), scale_m4_fl(), DRWManager::spheres, and translate_m4().
Referenced by draw_compute_culling(), DRW_view_update(), shadow_cascade_random_matrix_set(), and shadow_cube_random_position_set().
|
static |
Definition at line 41 of file draw_debug.c.
Referenced by DRW_debug_line_v3v3(), DRW_debug_modelmat(), DRW_debug_modelmat_reset(), and DRW_debug_sphere().