Share via


Texture.Texture(IDirect3DTexture9,Device,Pool) Constructor (Microsoft.DirectX.Direct3D)

Creates a new instance of the Texture class.

Definition

Visual Basic Public Sub New( _
    ByVal lp As IDirect3DTexture9, _
    ByVal device As Device, _
    ByVal pool As Pool _
)
C# public Texture(
    IDirect3DTexture9 lp,
    Device device,
    Pool pool
);
C++ public:
 Texture(
    IDirect3DTexture9 lp,
    Devicedevice,
    Pool pool
);
JScript public function Texture(
    lp : IDirect3DTexture9,
    device : Device,
    pool : Pool
);

Parameters

lp Microsoft.DirectX.PrivateImplementationDetails.IDirect3DTexture9
Unmanaged Component Object Model (COM) IDirect3DTexture9 interface pointer.
device Microsoft.DirectX.Direct3D.Device
A Device object to associate with the Texture.
pool Microsoft.DirectX.Direct3D.Pool
Member of the Pool enumerated type that describes the memory class into which the texture should be placed.

Remarks

An application can discover support for automatic generation of mipmaps in a particular format by calling Manager.CheckDeviceFormat with Usage.AutoGenerateMipMap. If Manager.CheckDeviceFormat returns false, the Texture constructor succeeds, but returns a single-level texture.

Exceptions

InvalidCallException

The method call is invalid. For example, a parameter might contain an invalid value.

OutOfVideoMemoryException

Microsoft Direct3D does not have enough display memory to perform the operation.

OutOfMemoryExceptionLeave Site

Direct3D could not allocate sufficient memory to complete the call.

See Also