示例#1
0
 public void Flush(Int2 screenResolution, GlyphRenderer renderer)
 {
     foreach (var batch in batches)
     {
         renderer.Render(batch.Key, screenResolution, new Span <GlyphInstance>(batch.Value.Glyphs, 0, batch.Value.GlyphCount));
         batchPool.Return(batch.Value);
     }
     batches.Clear();
 }
 public void Flush(DeviceContext context, Int2 screenResolution, GlyphRenderer renderer)
 {
     foreach (var batch in batches)
     {
         renderer.Render(context, batch.Key, screenResolution, batch.Value.Glyphs, 0, batch.Value.GlyphCount);
         batchPool.Return(batch.Value);
     }
     batches.Clear();
 }