I'm currently tasked with porting a control from Direct 11 to DirectX 12.
How do I draw text on the screen?
How do I draw any 2D on a DirectX 12 device?
Current Text rendering code is below:
using (var textFormat = new TextFormat(device2DManager.DirectWriteFactory, string.IsNullOrEmpty(text.FontName) ? FontName : text.FontName, text.FontSize == 0 ? FontSize : text.FontSize))
{
renderTarget.DrawText(text.Text, textFormat,
new RawRectangleF(autoPosition.HasValue ? autoPoint.X : text.Location.X, autoPosition.HasValue ? autoPoint.Y : text.Location.Y,
renderTarget.Size.Width, renderTarget.Size.Height),
foreColor);
}