DevIL Documentation Home | Previous | Next

ilutD3D8Texture, ilutD3D8TexFromFile, ilutD3D8TexFromFileInMemory, ilutD3D8TexFromFileHandle, ilutD3D8TexFromResource

These functions create Direct3D 8 textures from images.


IDirect3DTexture8 *ilutD3D8Texture(
  IDirect3DDevice8 *Device
);

ILboolean ilutD3D8TexFromFile( IDirect3DDevice8
*Device, char *FileName, IDirect3DTexture8 **Texture );
ILboolean ilutD3D8TexFromFileInMemory( IDirect3DDevice8
*Device, ILvoid *Lump, ILuint Size, IDirect3DTexture8 **Texture );
ILboolean ilutD3D8TexFromFileHandle( IDirect3DDevice8
*Device, ILHANDLE File, IDirect3DTexture8 **Texture );
ILboolean ilutD3D8TexFromResource( IDirect3DDevice8
*Device, HMODULE SrcModule, char *SrcResource, IDirect3DTexture8 **Texture );

Parameters

Device
Pointer to a D3D8 device to load the texture into.
FileName
Name of the image file to load.
Texture
Pointer to load the D3D8 texture into.
Lump
Pointer to memory containing an image "file".
Size
Contains the size of Lump.

Remarks

These functions are designed to behave exactly like the the D3DX toolkit's D3D texture functions. In most instances, these functions can be used a drop-in replacement for parts of D3DX.

Error Codes

ILUT_ILLEGAL_OPERATION - There is currently no image bound. Use ilGenImages and ilBindImage before calling this function.
ILUT_OUT_OF_MEMORY - Could not allocate enough memory for the new bitmap.

See Also

ilGenImages, ilBindImage, ilLoad, ilLoadF, ilLoadL, ilLoadImage, ilutD3D8MipFunc