private void DrawPerformanceStats(ref ImperativeRenderer ir) { const float scale = 1f; var text = PerformanceStats.GetText(this); using (var buffer = BufferPool <BitmapDrawCall> .Allocate(text.Length)) { var layout = Font.LayoutString(text, buffer, scale: scale); var layoutSize = layout.Size; var position = new Vector2(30f, 30f); var dc = layout.DrawCalls; ir.FillRectangle( Bounds.FromPositionAndSize(position, layoutSize), Color.Black ); ir.Layer += 1; ir.DrawMultiple(dc, position); } }
private void DrawPerformanceStats(SpriteBatch spriteBatch) { const float scale = 1f; var text = PerformanceStats.GetText(this); // FIXME Console.WriteLine(text); /* * using (var buffer = BufferPool<BitmapDrawCall>.Allocate(text.Length)) { * var layout = Font.LayoutString(text, buffer, scale: scale); * var layoutSize = layout.Size; * var position = new Vector2(30f, 30f); * var dc = layout.DrawCalls; * * ir.FillRectangle( * Bounds.FromPositionAndSize(position, layoutSize), * Color.Black * ); * ir.Layer += 1; * ir.DrawMultiple(dc, position); * } */ }