DevIL Documentation Home | Previous | Next

ilutD3D8TexFromFile

The ilutD3D8TexFromFile function loads a file into a D3D8 texture.

ILboolean ilutD3D8TexFromFile(
  IDirect3DDevice8 *Device,  char *FileName,  IDirect3DTexture8 **Texture);


Parameters

Device
Pointer to an IDirect3DDevice8 interface, representing the device to be associated with the texture.
FileName
File to create the texture from.
Texture
Address of a pointer to an IDirect3DTexture8 interface, representing the created texture object.


Remarks

ilutD3D8TexFromFile loads the file named by FileName and converts it to a Direct3D 8 texture (IDirect3DTexture8). This function creates the texture, so the pointer does not even have to be allocated beforehand. This function is functionally equivalent to D3DX's D3DXCreateTextureFromFileInMemory.

Error Codes

ILUT_COULD_NOT_OPEN_FILE - Could not load the file named in FileName.
ILUT_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.

See Also

ilLoad