Example #1
0
 void Reset()
 {
     if (strokeStyle != null)
     {
         strokeStyle.Dispose();
         strokeStyle = null;
     }
 }
Example #2
0
 public void Dispose()
 {
     blueBrush1.Dispose();
     blueBrush2.Dispose();
     blueBrush3.Dispose();
     strokeStyle.Dispose();
     strokeStyle2.Dispose();
 }
 public override void Dispose()
 {
     if (Style != null)
     {
         Style.Dispose();
         Style = null;
     }
     base.Dispose();
 }
        private void Update(bool forceUpdate = false)
        {
            if (isUpdated || forceUpdate)
            {
                isUpdated = false;

                strokeBrush?.Dispose();
                strokeBrush = new d2.SolidColorBrush(Renderer.Device, _stroke.ToColor4());

                strokeStyle?.Dispose();
                strokeStyle = new d2.StrokeStyle(Renderer.Factory, _strokeStyleProp);
            }
        }
Example #5
0
        public void Dispose()
        {
            if (Brush != null)
            {
                Brush.Dispose();
                Brush = null;
            }

            if (strokeStyle != null)
            {
                strokeStyle.Dispose();
                strokeStyle = null;
            }
        }
Example #6
0
        public void Dispose()
        {
            foreach (KeyValuePair <string, D2D1.Brush> p in Brushes)
            {
                p.Value.Dispose();
            }
            DashStyle.Dispose();

            D2DTarget.Dispose();
            D2DDevice.Dispose();
            D2DContext.Dispose();
            D2DFactory.Dispose();

            BlackTextureView.Dispose();
            WhiteTextureView.Dispose();
            AnisotropicSampler.Dispose();

            blendStateOpaque.Dispose();
            blendStateTransparent.Dispose();

            rasterizerStateSolidCullBack.Dispose();
            rasterizerStateWireframeCullBack.Dispose();
            rasterizerStateSolidNoCull.Dispose();
            rasterizerStateWireframeNoCull.Dispose();
            depthStencilStateDefault.Dispose();
            depthStencilStateNoDepth.Dispose();

            foreach (Camera c in Cameras)
            {
                c.Dispose();
            }
            constantBuffer.Dispose();

            swapChain.Dispose();
            Device.Dispose();
            Context.Dispose();
        }