Example #1
0
        protected override void Destroy()
        {
            DestroyPlatformDevice();

            // Notify listeners
            if (Disposing != null)
            {
                Disposing(this, EventArgs.Empty);
            }

            SamplerStates.Dispose();
            BlendStates.Dispose();
            RasterizerStates.Dispose();
            if (DepthStencilBuffer != null)
            {
                DepthStencilBuffer.Dispose();
            }
            primitiveQuad.Dispose();

            SamplerStates      = null;
            BlendStates        = null;
            RasterizerStates   = null;
            DepthStencilStates = null;

            base.Destroy();
        }