D3DXCreateTextureFromFile()

来源:互联网 发布:淘宝怎么提升搜索排名 编辑:程序博客网 时间:2024/05/16 16:00
从磁盘文件获取纹理  HRESULT  WINAPI  D3DXCreateTextureFromFile(          LPDIRECT3DDEVICE9       pDevice,       //Direct3D设备指针                  LPCTSTR     SrcFile,        //纹理图形文件       LPDIRECT3DTEXTURE9      *ppTexture      //存储Direct3D纹理的指针地址  );      


该函数支持的图形文件类型:bmp、dds、dib、jpg、png以及tga等。

Parameters

pDevice
[in] Pointer to an IDirect3DDevice9 interface, representing the device to be associated with the texture.
pSrcFile
[in] Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
ppTexture
[out] Address of a pointer to an IDirect3DTexture9 interface, representing the created texture object.

 

原创粉丝点击