diff --git a/osu.Framework.Font/Graphics/MultiShaderBufferedDrawNodeSharedData.cs b/osu.Framework.Font/Graphics/MultiShaderBufferedDrawNodeSharedData.cs index ba432fc..3207e9a 100644 --- a/osu.Framework.Font/Graphics/MultiShaderBufferedDrawNodeSharedData.cs +++ b/osu.Framework.Font/Graphics/MultiShaderBufferedDrawNodeSharedData.cs @@ -26,7 +26,7 @@ public MultiShaderBufferedDrawNodeSharedData(RenderbufferInternalFormat[] format public void CreateDefaultFrameBuffers(IShader[] shaders) { - shaderBuffers.Clear(); + clearBuffers(); var filterMode = PixelSnapping ? All.Nearest : All.Linear; @@ -57,7 +57,11 @@ public FrameBuffer[] GetDrawFrameBuffers() protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); + clearBuffers(); + } + private void clearBuffers() + { // clear all frame in the dictionary. foreach (var shaderBuffer in shaderBuffers) {