DirectX SDK

DirectDrawSurface7.GetLOD

The DirectDrawSurface7.GetLOD method retrieves the maximum level of detail currently set for a managed mipmap surface. This method succeeds only on managed textures (see Remarks).

object.GetLOD() As Long

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.

Return Values

If the method succeeds, it returns the maximum level of detail for the mipmap chain.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INVALIDPARAMS
DDERR_INVALIDOBJECT

Remarks

Applications can call this method only for managed textures (those that were created with the DDSCAPS2_TEXTUREMANAGE flag). Calling this method on a nonmanaged texture causes the method to fail and raise the DDERR_INVALIDOBJECT error.

This method communicates to the Direct3D texture manager the most detailed mipmap in this chain that it should load into local video memory. For example, in a five-level mipmap chain, a return value of 2 indicates that the texture manager only loads mipmap levels 2 through 4 into local video memory at any given time. Likewise, if the most detailed mipmap in the chain has the dimensions 256×256, a return value of 2 means that the largest mipmap ever present in video memory has dimensions 64×64.

See Also

DirectDrawSurface7.SetLOD, Texture Filtering With Mipmaps, Automatic Texture Management, Textures