DirectX SDK |
The D3DXCheckTextureRequirements function returns information about texture creation. It provides an easy mechanism to determine the closest surface type that works with the current Direct3DDevice device. Given an ideal texture format, width, and height, and a mipmapping flag, it returns the closest match that works with the chosen device.
HRESULT D3DXCheckTextureRequirements( LPDIRECT3DDEVICE7 pd3dDevice, LPDWORD pFlags, LPDWORD pWidth, LPDWORD pHeight, D3DX_SURFACEFORMAT* pPixelFormat, );
If the function succeeds, the return value is S_OK.
If the function fails, the return value may be one of the following values:
D3DXERR_INVALIDPARAMETER |
D3DXERR_NOMATCHFOUND |
D3DXERR_NULLPOINTER |
This function provides a helper to determine what resizing and format conversion the D3DXCreateTexture, D3DXCreateTextureFromFile, and D3DXCreateCubeMapTexture functions will need to do. In most cases, the create functions can be used directly without performing this step.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Version: Requires DirectX 7.0.
Header: Declared in d3dxcore.h.
Library: Use d3dx.lib.