예제 #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);
 }