public TextureProvider(TextureResolution resolution) { Assert.ArgumentNotNull(resolution, nameof(resolution)); this.resolution = resolution; resolution.Changed += (s, e) => { texture?.Release(); texture = null; NotifyChanged(); }; }
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); }
public BlankChannelTextureProvider(TextureResolution resolution, Channel textureChannel) : base(resolution) { this.textureChannel = textureChannel; }
public ResourcesTextureProvider(TextureResolution resolution, string texturePath) : base(resolution) { this.texturePath = texturePath; }
public SolidColorTextureProvider(TextureResolution resolution, Color color) : base(resolution) { this.color = color; }
public WebTextureProvider(TextureResolution resolution, string textureLink) : base(resolution) { this.textureLink = textureLink; }
private static float TextureResolutionToFLoat(TextureResolution tr) { return((tr == TextureResolution.FullResolution) ? 1 : (tr == TextureResolution.DoubleResolution) ? 2 : 0.5f); }