Table of Contents

Method DrawString

Namespace
Box3D
Assembly
Box3D.NET.dll

DrawString(Vector3, ReadOnlySpan<byte>, DebugColor)

Draws text anchored to a world position.

void DrawString(Vector3 position, ReadOnlySpan<byte> utf8Text, DebugColor color)

Parameters

position Vector3

Where the text belongs, in world space.

utf8Text ReadOnlySpan<byte>

The text, UTF-8 encoded and not NUL-terminated.

color DebugColor

The suggested colour.

Remarks

The span points at memory Box3D owns and is valid only for the duration of the call. Copy it if the renderer defers drawing to later in the frame. It arrives as UTF-8 bytes rather than a string because turning it into one would allocate on every label, every frame.