Blender V5.0
draw_debug.hh File Reference

Simple API to draw debug shapes and log in the viewport. More...

Go to the source code of this file.

Classes

class  blender::draw::DebugDraw

Namespaces

namespace  blender
namespace  blender::draw

Functions

Init and state
void blender::draw::drw_debug_clear ()
Draw functions
void blender::draw::drw_debug_line (const float3 v1, const float3 v2, const float4 color, const uint lifetime)
void blender::draw::drw_debug_polygon (Span< float3 > face_verts, const float4 color, const uint lifetime)
void blender::draw::drw_debug_bbox (const BoundBox &bbox, const float4 color, const uint lifetime)
void blender::draw::drw_debug_sphere (const float3 center, float radius, const float4 color, const uint lifetime)
void blender::draw::drw_debug_point (const float3 pos, float rad, const float4 col, const uint lifetime)
void blender::draw::drw_debug_matrix (const float4x4 &m4, const uint lifetime)
void blender::draw::drw_debug_matrix_as_bbox (const float4x4 &mat, const float4 color, const uint lifetime)

Variables

constexpr uint blender::draw::drw_debug_persistent_lifetime = ~0u

Detailed Description

Simple API to draw debug shapes and log in the viewport.

Both CPU and GPU implementation are supported and symmetrical (meaning GPU shader can use it too, see common_draw_lib.glsl).

NOTE: CPU logging will overlap GPU logging on screen as it is drawn after.

Definition in file draw_debug.hh.