Axiom.Core.TextureManager.SetPreferredIntegerBitDepth C# (CSharp) Method

SetPreferredIntegerBitDepth() public method

public SetPreferredIntegerBitDepth ( ushort bits, bool reloadTextures ) : void
bits ushort
reloadTextures bool
return void
		public void SetPreferredIntegerBitDepth( ushort bits, bool reloadTextures )
		{
			_preferredIntegerBitDepth = bits;

			if ( reloadTextures )
			{
				// Iterate throught all textures
				foreach ( Texture texture in Resources )
				{
					// Reload loaded and reloadable texture only
					if ( texture.IsLoaded && texture.IsReloadable )
					{
						texture.Unload();
						texture.DesiredIntegerBitDepth = bits;
						texture.Load();
					}
					else
					{
						texture.DesiredIntegerBitDepth = bits;
					}
				}
			}
		}