| 1115 | } |
| 1116 | |
| 1117 | void DebugDraw::DrawLine(const Vector3& start, const Vector3& end, const Color& color, float duration, bool depthTest) |
| 1118 | { |
| 1119 | PROFILE_MEM(EngineDebug); |
| 1120 | const Float3 startF = start - Context->Origin, endF = end - Context->Origin; |
| 1121 | auto& debugDrawData = depthTest ? Context->DebugDrawDepthTest : Context->DebugDrawDefault; |
| 1122 | if (duration > 0) |
| 1123 | { |
| 1124 | DebugLine l = { startF, endF, Color32(color), duration }; |
| 1125 | debugDrawData.DefaultLines.Add(l); |
| 1126 | } |
| 1127 | else |
| 1128 | { |
| 1129 | Vertex l = { startF, Color32(color) }; |
| 1130 | debugDrawData.OneFrameLines.Add(l); |
| 1131 | l.Position = endF; |
| 1132 | debugDrawData.OneFrameLines.Add(l); |
| 1133 | } |
| 1134 | } |
| 1135 | |
| 1136 | void DebugDraw::DrawLine(const Vector3& start, const Vector3& end, const Color& startColor, const Color& endColor, float duration, bool depthTest) |
| 1137 | { |