Axiom.RenderSystems.DirectX9.D3DTexture.load C# (CSharp) Метод

load() защищенный метод

protected load ( ) : void
Результат void
		protected override void load()
		{
			// create a render texture if need be
			if ( ( Usage & TextureUsage.RenderTarget ) == TextureUsage.RenderTarget )
			{
				CreateInternalResources();
				return;
			}

			if ( !internalResourcesCreated )
			{
				// NB: Need to initialise pool to some value other than D3DPOOL_DEFAULT,
				// otherwise, if the texture loading failed, it might re-create as empty
				// texture when device lost/restore. The actual pool will be determined later.
				this._d3dPool = D3D.Pool.Managed;
			}

			// create a regular texture
			switch ( this.TextureType )
			{
				case TextureType.OneD:
				case TextureType.TwoD:
					this.LoadNormalTexture();
					break;

				case TextureType.ThreeD:
					this.LoadVolumeTexture();
					break;

				case TextureType.CubeMap:
					this.LoadCubeTexture();
					break;

				default:
					throw new Exception( "Unsupported texture type." );
			}
		}