Platform SDK: DirectX

Direct3DDevice7.PreLoad

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

object.PreLoad( _ 
  Texture As DirectDrawSurface7)

Parameters

object
Object expression that resolves to a Direct3DDevice7 object.
Texture
Reference to the DirectDrawSurface7 object to be loaded into memory.

Error Codes

If the method fails, an error is raised and Err.Number may be set to 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 evicts 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 these requirements are not met, the method fails and returns DDERR_INVALIDPARAMS.

See Also

Automatic Texture Management