DirectX SDK |
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
If the method succeeds, it returns the maximum level of detail for the mipmap chain.
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DDERR_INVALIDPARAMS |
DDERR_INVALIDOBJECT |
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.
DirectDrawSurface7.SetLOD, Texture Filtering With Mipmaps, Automatic Texture Management, Textures