/// <summary> /// Unloads the resource. /// </summary> /// <param name="device">The device.</param> /// <param name="resources">Parent ResourceDictionary.</param> protected override void UnloadResourceInternal(EngineDevice device, ResourceDictionary resources) { _defaultBlendState = SeeingSharpUtil.DisposeObjectLazy(_defaultBlendState); _depthStencilStateDefault = SeeingSharpUtil.DisposeObjectLazy(_depthStencilStateDefault); _depthStencilStateDisableZWrites = SeeingSharpUtil.DisposeObjectLazy(_depthStencilStateDisableZWrites); _rasterStateLines = SeeingSharpUtil.DisposeObjectLazy(_rasterStateLines); _rasterStateDefault = SeeingSharpUtil.DisposeObjectLazy(_rasterStateDefault); _samplerStateLow = SeeingSharpUtil.DisposeObjectLazy(_samplerStateLow); _samplerStateMedium = SeeingSharpUtil.DisposeObjectLazy(_samplerStateMedium); _samplerStateHigh = SeeingSharpUtil.DisposeObjectLazy(_samplerStateHigh); }