DirectX SDK

IDirect3DDevice7::PreLoad

The IDirect3DDevice7::Preload method instructs the Direct3D texture manager to load a managed texture into video memory.

HRESULT PreLoad(
  LPDIRECTDRAWSURFACE7 lpddsTexture
);

Parameters

lpddsTexture
Address of the IDirectDrawSurface7 interface for the texture surface to be loaded into memory.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS

Remarks

This method forces the system to load a managed texture into video memory. If sufficient video memory is not available, the system removes other textures to regain memory, then loads the texture. The texture being loaded must be a managed texture (created with the DDSCAPS2_TEXTUREMANAGE or DDSCAPS2_D3DTEXTUREMANAGE flags). If not, the method fails and returns DDERR_INVALIDPARAMS.

Requirements

  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 d3d.h.

See Also

Automatic Texture Management