internal void SetResources(OutlineResources resources)
 {
     if (resources == null)
     {
         if (_materials != null)
         {
             _materials.Dispose();
             _materials = null;
         }
     }
     else if (_materials == null || _materials.OutlineResources != resources)
     {
         _materials = resources.CreateMaterialSet();
         _materials.Reset(this);
         _changed = true;
     }
 }
        internal void UpdateChanged()
        {
            if (_outlineSettings != null)
            {
                _outlineColor     = _outlineSettings.OutlineColor;
                _outlineWidth     = _outlineSettings.OutlineWidth;
                _outlineIntensity = _outlineSettings.OutlineIntensity;
                _outlineMode      = _outlineSettings.OutlineMode;
            }

            if (_materials != null)
            {
                if (_outlineColor != _materials.OutlineColor ||
                    _outlineWidth != _materials.OutlineWidth ||
                    _outlineIntensity != _materials.OutlineIntensity ||
                    _outlineMode != _materials.OutlineMode)
                {
                    _materials.Reset(this);
                    _changed = true;
                }
            }
        }
Пример #3
0
        public void Reset_ThrowsIfDisposed()
        {
            _materialSet.Dispose();

            Assert.Throws <ObjectDisposedException>(() => _materialSet.Reset(_materialSet));
        }