mirror of
https://github.com/ppy/osu.git
synced 2025-02-11 07:52:54 +08:00
Reduce buffer count by one
This commit is contained in:
parent
95f36c36c4
commit
024f136d82
@ -213,11 +213,14 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
|
|
||||||
public override void Draw(Action<TexturedVertex2D> vertexAction)
|
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);
|
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();
|
shader.Bind();
|
||||||
|
|
||||||
Vector2 localInflationAmount = edge_smoothness * DrawInfo.MatrixInverse.ExtractScale().Xy;
|
Vector2 localInflationAmount = edge_smoothness * DrawInfo.MatrixInverse.ExtractScale().Xy;
|
||||||
|
Loading…
Reference in New Issue
Block a user