| 2274 | } |
| 2275 | |
| 2276 | void DebugDraw::DrawText(const StringView& text, const Float2& position, const Color& color, int32 size, float duration) |
| 2277 | { |
| 2278 | if (text.Length() == 0 || size < 4) |
| 2279 | return; |
| 2280 | PROFILE_MEM(EngineDebug); |
| 2281 | Array<DebugText2D>* list = duration > 0 ? &Context->DebugDrawDefault.DefaultText2D : &Context->DebugDrawDefault.OneFrameText2D; |
| 2282 | auto& t = list->AddOne(); |
| 2283 | t.Text.Resize(text.Length() + 1); |
| 2284 | Platform::MemoryCopy(t.Text.Get(), text.Get(), text.Length() * sizeof(Char)); |
| 2285 | t.Text[text.Length()] = 0; |
| 2286 | t.Position = position; |
| 2287 | t.Size = size; |
| 2288 | t.Color = color; |
| 2289 | t.TimeLeft = duration; |
| 2290 | } |
| 2291 | |
| 2292 | void DebugDraw::DrawText(const StringView& text, const Vector3& position, const Color& color, int32 size, float duration, float scale) |
| 2293 | { |