1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 01:02:56 +08:00

Reduce buffer count by one

This commit is contained in:
Dean Herbert 2019-07-19 14:24:11 +09:00
parent 95f36c36c4
commit 024f136d82

View File

@ -213,11 +213,14 @@ namespace osu.Game.Graphics.Backgrounds
public override void Draw(Action<TexturedVertex2D> vertexAction)
{
if (vertexBatch == null && Source.AimCount > 0)
vertexBatch = new LinearBatch<TexturedVertex2D>(Source.AimCount * 3, 2, PrimitiveType.Triangles);
base.Draw(vertexAction);
if (vertexBatch == null || vertexBatch.Size != Source.AimCount * 6)
{
vertexBatch?.Dispose();
vertexBatch = new LinearBatch<TexturedVertex2D>(Source.AimCount * 6, 1, PrimitiveType.Triangles);
}
shader.Bind();
Vector2 localInflationAmount = edge_smoothness * DrawInfo.MatrixInverse.ExtractScale().Xy;