Partager via


D3DMXCheckTextureRequirements (Windows Embedded CE 6.0)

1/6/2010

This function checks texture creation parameters. If parameters are invalid, this function returns corrected parameters.

Syntax

HRESULT WINAPI D3DMXCheckTextureRequirements(
  LPDIRECT3DMOBILEDEVICE pDevice,
  UINT*                  pWidth,
  UINT*                  pHeight,
  UINT*                  pNumMipLevels,
  DWORD                  Usage,
  D3DMFORMAT*            pFormat,
  D3DMPOOL               Pool
);

Parameters

  • pDevice
    [in] Pointer to an IDirect3DMobileDevice interface, representing the device to be associated with the texture.
  • pWidth
    [in, out] Pointer to the requested width in pixels, or NULL. Returns the corrected size.
  • pHeight
    [in, out] Pointer to the requested height in pixels, or NULL. Returns the corrected size.
  • pNumMipLevels
    [in, out] Pointer to number of requested mipmap levels, or NULL. Returns the corrected number of mipmap levels.
  • Usage
    [in] A DWORD value that is either 0, D3DMUSAGE_RENDERTARGET, or D3DMUSAGE_DYNAMIC (see D3DMUSAGE Values). Setting this flag to D3DMUSAGE_RENDERTARGET indicates that the surface is to be used as a render target. The resource can then be passed to the pNewRenderTarget parameter of the IDirect3DMobileDevice::SetRenderTarget method. If D3DMUSAGE_RENDERTARGET is specified, the application should check that the device supports this operation by calling IDirect3DMobile::CheckDeviceFormat.
  • pFormat
    [in, out] Pointer to a member of the D3DMFORMAT enumerated type. Specifies the desired pixel format, or NULL. Returns the corrected format.
  • Pool
    [in] Member of the D3DMPOOL enumerated type, describing the memory class into which the texture should be placed.

Return Value

If the function succeeds, the return value is D3D_OK (see D3DM Values).

If the function fails, the return value can be one of the following values.

Value Description

D3DERR_NOTAVAILABLE

This device does not support the queried technique.

D3DERR_INVALIDCALL

The method call is invalid. For example, a method's parameter may have an invalid value.

Remarks

If parameters to this function are invalid, this function returns corrected parameters.

Requirements

Header d3dmx.h
Library D3dmx.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

D3DMX Functions
IDirect3DMobileDevice
D3DMUSAGE Values
IDirect3DMobileDevice::SetRenderTarget
IDirect3DMobile::CheckDeviceFormat
D3DMFORMAT
D3DMPOOL
D3DM Values