コード例 #1
0
ファイル: EffectManager.cs プロジェクト: liwq-net/XnaVG
 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
ファイル: EffectManager.cs プロジェクト: liwq-net/XnaVG
        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;
            }
        }