Пример #1
0
        public TextureProvider(TextureResolution resolution)
        {
            Assert.ArgumentNotNull(resolution, nameof(resolution));

            this.resolution = resolution;

            resolution.Changed += (s, e) =>
            {
                texture?.Release();
                texture = null;
                NotifyChanged();
            };
        }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TextureResolution != 0)
            {
                hash ^= TextureResolution.GetHashCode();
            }
            if (ShadowQualtity != 0)
            {
                hash ^= ShadowQualtity.GetHashCode();
            }
            if (ParticleDetails != 0F)
            {
                hash ^= ParticleDetails.GetHashCode();
            }
            return(hash);
        }
Пример #3
0
 public BlankChannelTextureProvider(TextureResolution resolution, Channel textureChannel) : base(resolution)
 {
     this.textureChannel = textureChannel;
 }
Пример #4
0
 public ResourcesTextureProvider(TextureResolution resolution, string texturePath) : base(resolution)
 {
     this.texturePath = texturePath;
 }
 public SolidColorTextureProvider(TextureResolution resolution, Color color) : base(resolution)
 {
     this.color = color;
 }
Пример #6
0
 public WebTextureProvider(TextureResolution resolution, string textureLink) : base(resolution)
 {
     this.textureLink = textureLink;
 }
Пример #7
0
 private static float TextureResolutionToFLoat(TextureResolution tr)
 {
     return((tr == TextureResolution.FullResolution) ? 1 : (tr == TextureResolution.DoubleResolution) ? 2 : 0.5f);
 }