From c978a4c09186f0676d74d1f47b74ecfa381f3d8b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 26 Nov 2016 19:22:56 +0900 Subject: [PATCH 1/6] Tidy up code. Make trail smooth. --- osu.Game/Graphics/Cursor/CursorTrail.cs | 155 ++++++++++++++++++ .../Graphics/Cursor/OsuCursorContainer.cs | 15 +- osu.Game/osu.Game.csproj | 1 + 3 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 osu.Game/Graphics/Cursor/CursorTrail.cs diff --git a/osu.Game/Graphics/Cursor/CursorTrail.cs b/osu.Game/Graphics/Cursor/CursorTrail.cs new file mode 100644 index 0000000000..741fdbad73 --- /dev/null +++ b/osu.Game/Graphics/Cursor/CursorTrail.cs @@ -0,0 +1,155 @@ +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System.Linq; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Batches; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shaders; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; +using osu.Framework.Input; +using osu.Framework.MathUtils; +using OpenTK; + +namespace osu.Game.Graphics.Cursor +{ + class TrailSprite : Sprite + { + private Shader shader; + + public TrailSprite() + { + Origin = Anchor.Centre; + } + + protected override void ApplyDrawNode(DrawNode node) + { + base.ApplyDrawNode(node); + + SpriteDrawNode sNode = node as SpriteDrawNode; + sNode.RoundedTextureShader = sNode.TextureShader = shader; + } + + [BackgroundDependencyLoader] + private void load(ShaderManager shaders, TextureStore textures) + { + shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.Texture); + Texture = textures.Get(@"Cursor/cursortrail"); + } + } + + class CursorTrail : Container + { + public override bool Contains(Vector2 screenSpacePos) => true; + + int currentIndex; + + protected override bool CanBeFlattened => false; + + Shader shader; + + private double timeOffset; + + private float time; + + const int MAX_SPRITES = 2048; + + protected override DrawNode CreateDrawNode() => new TrailDrawNode(); + + protected override void ApplyDrawNode(DrawNode node) + { + base.ApplyDrawNode(node); + + TrailDrawNode tNode = node as TrailDrawNode; + tNode.Shader = shader; + tNode.Time = time; + } + + Vector2? last; + + protected override bool OnMouseMove(InputState state) + { + if (last == null) + { + last = state.Mouse.Position; + return base.OnMouseMove(state); + } + + Vector2 pos1 = last.Value; + Vector2 pos2 = state.Mouse.Position; + + Vector2 diff = (pos2 - pos1); + float distance = diff.Length; + Vector2 direction = diff / distance; + + float interval = this[0].DrawSize.X / 2; + + for (float d = interval; d < distance; d += interval) + { + last = pos1 + direction * d; + addPosition(last.Value); + } + + return base.OnMouseMove(state); + } + + private void addPosition(Vector2 pos) + { + var s = this[currentIndex]; + s.Position = pos; + s.Alpha = time + 1f; + + currentIndex = (currentIndex + 1) % MAX_SPRITES; + } + + public CursorTrail() + { + RelativeSizeAxes = Axes.Both; + + for (int i = 0; i < MAX_SPRITES; i++) + AddInternal(new TrailSprite()); + } + + [BackgroundDependencyLoader] + private void load(ShaderManager shaders) + { + shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.Texture); + } + + protected override void Update() + { + base.Update(); + + Invalidate(Invalidation.DrawNode); + + int fadeClockResetThreshold = 1000000; + + time = (float)(Time.Current - timeOffset) / 500f; + if (time > fadeClockResetThreshold) + ResetTime(); + } + + private void ResetTime() + { + foreach (var c in Children) + c.Alpha -= time; + + time = 0; + timeOffset = Time.Current; + } + + class TrailDrawNode : ContainerDrawNode + { + public Shader Shader; + public float Time; + + public override void Draw(IVertexBatch vertexBatch) + { + Shader.GetUniform("g_FadeClock").Value = Time; + base.Draw(vertexBatch); + } + } + } +} \ No newline at end of file diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index 081919feaf..bdf84e1d04 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -1,15 +1,22 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Collections.Generic; +using OpenTK; using osu.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; +using osu.Framework.Graphics.OpenGL; +using osu.Framework.Graphics.OpenGL.Buffers; +using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using osu.Framework.Input; +using OpenTK.Graphics; +using OpenTK.Graphics.ES30; namespace osu.Game.Graphics.Cursor { @@ -17,9 +24,14 @@ namespace osu.Game.Graphics.Cursor { protected override Drawable CreateCursor() => new OsuCursor(); + public OsuCursorContainer() + { + Add(new CursorTrail { Depth = -1 }); + } + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) { - ActiveCursor.Scale = new OpenTK.Vector2(1); + ActiveCursor.Scale = new Vector2(1); ActiveCursor.ScaleTo(1.2f, 100, EasingTypes.OutQuad); return base.OnMouseDown(state, args); } @@ -52,5 +64,4 @@ namespace osu.Game.Graphics.Cursor } } } - } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 00c46a7ce3..c35bafb251 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -64,6 +64,7 @@ + From 0de4ec451f26c6f35d23c145136074d41782e41c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 26 Nov 2016 19:23:05 +0900 Subject: [PATCH 2/6] Update resources, framework. --- osu-framework | 2 +- osu-resources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu-framework b/osu-framework index cc614047de..3dbd4a3109 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit cc614047de3471a2d2b4b988fed550fc946016b9 +Subproject commit 3dbd4a31095b99b8f69920afdbebeb4885061865 diff --git a/osu-resources b/osu-resources index 911564f95a..ab7b953ec9 160000 --- a/osu-resources +++ b/osu-resources @@ -1 +1 @@ -Subproject commit 911564f95a1b7820671cb17fadcd11bab8ba144e +Subproject commit ab7b953ec9393d8df5aeb23d23e8b1f8154601c1 From be0cc7badcb1669aff29a3e2cabc3468787ab67b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 26 Nov 2016 19:25:58 +0900 Subject: [PATCH 3/6] Code tidying. --- osu.Game/Graphics/Cursor/CursorTrail.cs | 76 ++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/osu.Game/Graphics/Cursor/CursorTrail.cs b/osu.Game/Graphics/Cursor/CursorTrail.cs index 741fdbad73..d65e20c47d 100644 --- a/osu.Game/Graphics/Cursor/CursorTrail.cs +++ b/osu.Game/Graphics/Cursor/CursorTrail.cs @@ -56,6 +56,8 @@ namespace osu.Game.Graphics.Cursor const int MAX_SPRITES = 2048; + Vector2? lastPosition; + protected override DrawNode CreateDrawNode() => new TrailDrawNode(); protected override void ApplyDrawNode(DrawNode node) @@ -67,43 +69,6 @@ namespace osu.Game.Graphics.Cursor tNode.Time = time; } - Vector2? last; - - protected override bool OnMouseMove(InputState state) - { - if (last == null) - { - last = state.Mouse.Position; - return base.OnMouseMove(state); - } - - Vector2 pos1 = last.Value; - Vector2 pos2 = state.Mouse.Position; - - Vector2 diff = (pos2 - pos1); - float distance = diff.Length; - Vector2 direction = diff / distance; - - float interval = this[0].DrawSize.X / 2; - - for (float d = interval; d < distance; d += interval) - { - last = pos1 + direction * d; - addPosition(last.Value); - } - - return base.OnMouseMove(state); - } - - private void addPosition(Vector2 pos) - { - var s = this[currentIndex]; - s.Position = pos; - s.Alpha = time + 1f; - - currentIndex = (currentIndex + 1) % MAX_SPRITES; - } - public CursorTrail() { RelativeSizeAxes = Axes.Both; @@ -140,9 +105,44 @@ namespace osu.Game.Graphics.Cursor timeOffset = Time.Current; } + protected override bool OnMouseMove(InputState state) + { + if (lastPosition == null) + { + lastPosition = state.Mouse.Position; + return base.OnMouseMove(state); + } + + Vector2 pos1 = lastPosition.Value; + Vector2 pos2 = state.Mouse.Position; + + Vector2 diff = pos2 - pos1; + float distance = diff.Length; + Vector2 direction = diff / distance; + + float interval = this[0].DrawSize.X / 2; + + for (float d = interval; d < distance; d += interval) + { + lastPosition = pos1 + direction * d; + addPosition(lastPosition.Value); + } + + return base.OnMouseMove(state); + } + + private void addPosition(Vector2 pos) + { + var s = this[currentIndex]; + s.Position = pos; + s.Alpha = time + 1f; + + currentIndex = (currentIndex + 1) % MAX_SPRITES; + } + class TrailDrawNode : ContainerDrawNode { - public Shader Shader; + public new Shader Shader; public float Time; public override void Draw(IVertexBatch vertexBatch) From 23d0e52d4f06ff1fbdca3b41367382d5bf970ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sat, 26 Nov 2016 14:08:43 +0100 Subject: [PATCH 4/6] Optimize draw portion of cursor trail. --- osu-framework | 2 +- osu.Game/Graphics/Cursor/CursorTrail.cs | 76 +++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/osu-framework b/osu-framework index 3dbd4a3109..c0157172ef 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3dbd4a31095b99b8f69920afdbebeb4885061865 +Subproject commit c0157172ef277b5c2fa1039be9ea895fa27ae20a diff --git a/osu.Game/Graphics/Cursor/CursorTrail.cs b/osu.Game/Graphics/Cursor/CursorTrail.cs index d65e20c47d..82281cae1f 100644 --- a/osu.Game/Graphics/Cursor/CursorTrail.cs +++ b/osu.Game/Graphics/Cursor/CursorTrail.cs @@ -12,6 +12,13 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input; using osu.Framework.MathUtils; using OpenTK; +using System; +using osu.Framework.Graphics.OpenGL; +using osu.Framework.Graphics.OpenGL.Buffers; +using System.Collections.Concurrent; +using OpenTK.Graphics.ES30; +using System.Collections.Generic; +using System.Diagnostics; namespace osu.Game.Graphics.Cursor { @@ -24,14 +31,19 @@ namespace osu.Game.Graphics.Cursor Origin = Anchor.Centre; } + protected override DrawNode CreateDrawNode() => new TrailSpriteDrawNode(); + protected override void ApplyDrawNode(DrawNode node) { base.ApplyDrawNode(node); - SpriteDrawNode sNode = node as SpriteDrawNode; + TrailSpriteDrawNode sNode = node as TrailSpriteDrawNode; sNode.RoundedTextureShader = sNode.TextureShader = shader; + sNode.NeedsUpdate = true; } + public override bool IsVisible => true; + [BackgroundDependencyLoader] private void load(ShaderManager shaders, TextureStore textures) { @@ -40,6 +52,11 @@ namespace osu.Game.Graphics.Cursor } } + class TrailSpriteDrawNode : SpriteDrawNode + { + public bool NeedsUpdate; + } + class CursorTrail : Container { public override bool Contains(Vector2 screenSpacePos) => true; @@ -53,7 +70,8 @@ namespace osu.Game.Graphics.Cursor private double timeOffset; private float time; - + + TrailDrawNodeSharedData trailDrawNodeSharedData = new TrailDrawNodeSharedData(); const int MAX_SPRITES = 2048; Vector2? lastPosition; @@ -67,6 +85,7 @@ namespace osu.Game.Graphics.Cursor TrailDrawNode tNode = node as TrailDrawNode; tNode.Shader = shader; tNode.Time = time; + tNode.Shared = trailDrawNodeSharedData; } public CursorTrail() @@ -87,7 +106,7 @@ namespace osu.Game.Graphics.Cursor { base.Update(); - Invalidate(Invalidation.DrawNode); + Invalidate(Invalidation.DrawNode, shallPropagate: false); int fadeClockResetThreshold = 1000000; @@ -140,15 +159,62 @@ namespace osu.Game.Graphics.Cursor currentIndex = (currentIndex + 1) % MAX_SPRITES; } + public class TrailDrawNodeSharedData + { + public VertexBuffer VertexBuffer; + } + class TrailDrawNode : ContainerDrawNode { public new Shader Shader; public float Time; + public TrailDrawNodeSharedData Shared; - public override void Draw(IVertexBatch vertexBatch) + public override void Draw(Action vertexAction) { + if (Shared.VertexBuffer == null) + Shared.VertexBuffer = new QuadVertexBuffer(MAX_SPRITES, BufferUsageHint.DynamicDraw); + Shader.GetUniform("g_FadeClock").Value = Time; - base.Draw(vertexBatch); + + int updateStart = -1, updateEnd = 0; + int test = 0; + for (int i = 0; i < Children.Count; ++i) + { + TrailSpriteDrawNode tNode = Children[i] as TrailSpriteDrawNode; + if (tNode.NeedsUpdate) + { + if (updateStart == -1) + updateStart = i; + updateEnd = i + 1; + + int start = i * 4; + int end = start; + tNode.Draw(delegate (TexturedVertex2D v) + { + Shared.VertexBuffer.Vertices[end++] = v; + }); + + tNode.NeedsUpdate = false; + } + else if (updateStart != -1) + { + Shared.VertexBuffer.UpdateRange(updateStart * 4, updateEnd * 4); + updateStart = -1; + } + } + + // Update all remaining vertices that have been changed. + if (updateStart != -1) + Shared.VertexBuffer.UpdateRange(updateStart * 4, updateEnd * 4); + + SpriteDrawNode sNode = Children[0] as SpriteDrawNode; + sNode.Texture.TextureGL.Bind(); + sNode.TextureShader.Bind(); + + Shared.VertexBuffer.Draw(); + + sNode.TextureShader.Unbind(); } } } From 069a19a916cec89476fefd9b17c955d8661da5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sat, 26 Nov 2016 18:01:24 +0100 Subject: [PATCH 5/6] Make CursorTrail efficient and add colouring and transparency support. --- osu.Game/Graphics/Cursor/CursorTrail.cs | 149 +++++++++--------- .../Graphics/Cursor/OsuCursorContainer.cs | 7 - 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/osu.Game/Graphics/Cursor/CursorTrail.cs b/osu.Game/Graphics/Cursor/CursorTrail.cs index 82281cae1f..2263c0a884 100644 --- a/osu.Game/Graphics/Cursor/CursorTrail.cs +++ b/osu.Game/Graphics/Cursor/CursorTrail.cs @@ -1,71 +1,33 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; -using osu.Framework.Graphics.Batches; -using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shaders; -using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Input; -using osu.Framework.MathUtils; using OpenTK; using System; using osu.Framework.Graphics.OpenGL; using osu.Framework.Graphics.OpenGL.Buffers; -using System.Collections.Concurrent; using OpenTK.Graphics.ES30; -using System.Collections.Generic; -using System.Diagnostics; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Colour; namespace osu.Game.Graphics.Cursor { - class TrailSprite : Sprite - { - private Shader shader; - public TrailSprite() - { - Origin = Anchor.Centre; - } - - protected override DrawNode CreateDrawNode() => new TrailSpriteDrawNode(); - - protected override void ApplyDrawNode(DrawNode node) - { - base.ApplyDrawNode(node); - - TrailSpriteDrawNode sNode = node as TrailSpriteDrawNode; - sNode.RoundedTextureShader = sNode.TextureShader = shader; - sNode.NeedsUpdate = true; - } - - public override bool IsVisible => true; - - [BackgroundDependencyLoader] - private void load(ShaderManager shaders, TextureStore textures) - { - shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.Texture); - Texture = textures.Get(@"Cursor/cursortrail"); - } - } - - class TrailSpriteDrawNode : SpriteDrawNode - { - public bool NeedsUpdate; - } - - class CursorTrail : Container + class CursorTrail : Drawable { public override bool Contains(Vector2 screenSpacePos) => true; + public override bool HandleInput => true; int currentIndex; - protected override bool CanBeFlattened => false; - Shader shader; + Texture texture; + + Vector2 size => texture.Size * Scale; private double timeOffset; @@ -74,6 +36,8 @@ namespace osu.Game.Graphics.Cursor TrailDrawNodeSharedData trailDrawNodeSharedData = new TrailDrawNodeSharedData(); const int MAX_SPRITES = 2048; + private TrailPart[] parts = new TrailPart[MAX_SPRITES]; + Vector2? lastPosition; protected override DrawNode CreateDrawNode() => new TrailDrawNode(); @@ -84,8 +48,14 @@ namespace osu.Game.Graphics.Cursor TrailDrawNode tNode = node as TrailDrawNode; tNode.Shader = shader; + tNode.Texture = texture; + tNode.Size = size; tNode.Time = time; tNode.Shared = trailDrawNodeSharedData; + + for (int i = 0; i < parts.Length; ++i) + if (parts[i].InvalidationID > tNode.Parts[i].InvalidationID) + tNode.Parts[i] = parts[i]; } public CursorTrail() @@ -93,13 +63,17 @@ namespace osu.Game.Graphics.Cursor RelativeSizeAxes = Axes.Both; for (int i = 0; i < MAX_SPRITES; i++) - AddInternal(new TrailSprite()); + { + parts[i].InvalidationID = 0; + parts[i].WasUpdated = true; + } } [BackgroundDependencyLoader] - private void load(ShaderManager shaders) + private void load(ShaderManager shaders, TextureStore textures) { shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.Texture); + texture = textures.Get(@"Cursor/cursortrail"); } protected override void Update() @@ -117,8 +91,11 @@ namespace osu.Game.Graphics.Cursor private void ResetTime() { - foreach (var c in Children) - c.Alpha -= time; + for (int i = 0; i < parts.Length; ++i) + { + parts[i].Time -= time; + ++parts[i].InvalidationID; + } time = 0; timeOffset = Time.Current; @@ -128,18 +105,18 @@ namespace osu.Game.Graphics.Cursor { if (lastPosition == null) { - lastPosition = state.Mouse.Position; + lastPosition = state.Mouse.NativeState.Position; return base.OnMouseMove(state); } Vector2 pos1 = lastPosition.Value; - Vector2 pos2 = state.Mouse.Position; + Vector2 pos2 = state.Mouse.NativeState.Position; Vector2 diff = pos2 - pos1; float distance = diff.Length; Vector2 direction = diff / distance; - float interval = this[0].DrawSize.X / 2; + float interval = size.X / 2; for (float d = interval; d < distance; d += interval) { @@ -152,24 +129,46 @@ namespace osu.Game.Graphics.Cursor private void addPosition(Vector2 pos) { - var s = this[currentIndex]; - s.Position = pos; - s.Alpha = time + 1f; + parts[currentIndex].Position = pos; + parts[currentIndex].Time = time; + ++parts[currentIndex].InvalidationID; currentIndex = (currentIndex + 1) % MAX_SPRITES; } - public class TrailDrawNodeSharedData + struct TrailPart + { + public Vector2 Position; + public float Time; + public long InvalidationID; + public bool WasUpdated; + } + + class TrailDrawNodeSharedData { public VertexBuffer VertexBuffer; } - class TrailDrawNode : ContainerDrawNode + class TrailDrawNode : DrawNode { - public new Shader Shader; + public Shader Shader; + public Texture Texture; + public float Time; public TrailDrawNodeSharedData Shared; + public TrailPart[] Parts = new TrailPart[MAX_SPRITES]; + public Vector2 Size; + + public TrailDrawNode() + { + for (int i = 0; i < MAX_SPRITES; i++) + { + Parts[i].InvalidationID = 0; + Parts[i].WasUpdated = false; + } + } + public override void Draw(Action vertexAction) { if (Shared.VertexBuffer == null) @@ -178,11 +177,9 @@ namespace osu.Game.Graphics.Cursor Shader.GetUniform("g_FadeClock").Value = Time; int updateStart = -1, updateEnd = 0; - int test = 0; - for (int i = 0; i < Children.Count; ++i) + for (int i = 0; i < Parts.Length; ++i) { - TrailSpriteDrawNode tNode = Children[i] as TrailSpriteDrawNode; - if (tNode.NeedsUpdate) + if (Parts[i].WasUpdated) { if (updateStart == -1) updateStart = i; @@ -190,12 +187,21 @@ namespace osu.Game.Graphics.Cursor int start = i * 4; int end = start; - tNode.Draw(delegate (TexturedVertex2D v) - { - Shared.VertexBuffer.Vertices[end++] = v; - }); - tNode.NeedsUpdate = false; + Vector2 pos = Parts[i].Position; + ColourInfo colour = DrawInfo.Colour; + colour.TopLeft.Linear.A = Parts[i].Time + colour.TopLeft.Linear.A; + colour.TopRight.Linear.A = Parts[i].Time + colour.TopRight.Linear.A; + colour.BottomLeft.Linear.A = Parts[i].Time + colour.BottomLeft.Linear.A; + colour.BottomRight.Linear.A = Parts[i].Time + colour.BottomRight.Linear.A; + + Texture.Draw( + new Quad(pos.X - Size.X / 2, pos.Y - Size.Y / 2, Size.X, Size.Y), + colour, + null, + v => Shared.VertexBuffer.Vertices[end++] = v); + + Parts[i].WasUpdated = false; } else if (updateStart != -1) { @@ -208,13 +214,14 @@ namespace osu.Game.Graphics.Cursor if (updateStart != -1) Shared.VertexBuffer.UpdateRange(updateStart * 4, updateEnd * 4); - SpriteDrawNode sNode = Children[0] as SpriteDrawNode; - sNode.Texture.TextureGL.Bind(); - sNode.TextureShader.Bind(); + base.Draw(vertexAction); + Shader.Bind(); + + Texture.TextureGL.Bind(); Shared.VertexBuffer.Draw(); - sNode.TextureShader.Unbind(); + Shader.Unbind(); } } } diff --git a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs index bdf84e1d04..22d7af7dc8 100644 --- a/osu.Game/Graphics/Cursor/OsuCursorContainer.cs +++ b/osu.Game/Graphics/Cursor/OsuCursorContainer.cs @@ -1,22 +1,15 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Collections.Generic; using OpenTK; -using osu.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; -using osu.Framework.Graphics.OpenGL; -using osu.Framework.Graphics.OpenGL.Buffers; -using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using osu.Framework.Input; -using OpenTK.Graphics; -using OpenTK.Graphics.ES30; namespace osu.Game.Graphics.Cursor { From 2b9cb83aa2ba37af108da773e6a7ed4ea9486d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sat, 26 Nov 2016 18:35:59 +0100 Subject: [PATCH 6/6] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index c0157172ef..24af3b161d 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit c0157172ef277b5c2fa1039be9ea895fa27ae20a +Subproject commit 24af3b161da9447b678edd8ec32193df54f71e3b