Create a texture resource from a file.
HRESULT D3DX11CreateTextureFromFile( _In_ ID3D11Device *pDevice, _In_ LPCTSTR pSrcFile, _In_ D3DX11_IMAGE_LOAD_INFO *pLoadInfo, _In_ ID3DX11ThreadPump *pPump, _Out_ ID3D11Resource **ppTexture, _Out_ HRESULT *pHResult );
- pDevice [in]
A pointer to the device (see ID3D11Device) that will use the resource.
- pSrcFile [in]
The name of the file containing the resource. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.
- pLoadInfo [in]
Optional. Identifies the characteristics of a texture (see D3DX11_IMAGE_LOAD_INFO) when the data processor is created; set this to NULL to read the characteristics of a texture when the texture is loaded.
- pPump [in]
A pointer to a thread pump interface (see ID3DX11ThreadPump Interface). If NULL is specified, this function will behave synchronously and will not return until it is finished.
- ppTexture [out]
The address of a pointer to the texture resource (see ID3D11Resource).
- pHResult [out]
A pointer to the return value. May be NULL. If pPump is not NULL, then pHResult must be a valid memory location until the asynchronous execution completes.
The return value is one of the values listed in Direct3D 11 Return Codes.