Пример #1
0
 internal EffectManager(IServiceProvider provider)
 {
     _content = new ContentManager(provider, "XnaVG");
     Cover = new CoverEffect(_content.Load<Effect>("Cover"));
     StencilFill = new StencilFillEffect(_content.Load<Effect>("Stencil_Fill"));
     StencilText = new StencilTextEffect(_content.Load<Effect>("Stencil_Text"));
     StencilSolid = new StencilSolidEffect(_content.Load<Effect>("Stencil_Solid"));
     StencilStroke = new StencilStrokeEffect(_content.Load<Effect>("Stencil_Stroke"));
 }
Пример #2
0
        public void Dispose()
        {
            if (_content != null)
            {
                Cover.Dispose();
                StencilFill.Dispose();
                StencilText.Dispose();
                StencilSolid.Dispose();
                StencilStroke.Dispose();

                Cover = null;
                StencilFill = null;
                StencilText = null;
                StencilSolid = null;
                StencilStroke = null;

                _content.Dispose();
                _content = null;
            }
        }