public void Dispose() { sampler.Dispose(); vertexBuffer.Dispose(); oldTexture?.Dispose(); currentTexture?.Dispose(); bs.Dispose(); bs1.Dispose(); }