Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_debug.cc
| Show First 20 Lines • Show All 313 Lines • ▼ Show 20 Lines | template<> void DebugDraw::print_value<uint4>(const uint4 &value) | ||||
| print_no_endl("uint4(", value[0], ", ", value[1], ", ", value[2], ", ", value[3], ")"); | print_no_endl("uint4(", value[0], ", ", value[1], ", ", value[2], ", ", value[3], ")"); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Internals | /** \name Internals | ||||
| * | * | ||||
| * IMPORTANT: All of these are copied from the shader libs (common_debug_draw_lib.glsl & | * IMPORTANT: All of these are copied from the shader libraries (`common_debug_draw_lib.glsl` & | ||||
| * common_debug_print_lib.glsl). They need to be kept in sync to write the same data. | * `common_debug_print_lib.glsl`). They need to be kept in sync to write the same data. | ||||
| * \{ */ | * \{ */ | ||||
| void DebugDraw::draw_line(float3 v1, float3 v2, uint color) | void DebugDraw::draw_line(float3 v1, float3 v2, uint color) | ||||
| { | { | ||||
| DebugDrawBuf &buf = cpu_draw_buf_; | DebugDrawBuf &buf = cpu_draw_buf_; | ||||
| uint index = buf.command.vertex_len; | uint index = buf.command.vertex_len; | ||||
| if (index + 2 < DRW_DEBUG_DRAW_VERT_MAX) { | if (index + 2 < DRW_DEBUG_DRAW_VERT_MAX) { | ||||
| buf.verts[index + 0] = vert_pack(model_mat_ * v1, color); | buf.verts[index + 0] = vert_pack(model_mat_ * v1, color); | ||||
| ▲ Show 20 Lines • Show All 408 Lines • Show Last 20 Lines | |||||