Platform SDK: DirectX |
The IDirectDrawSurface7::SetLOD method sets the maximum level of detail for a managed mipmap surface. This method succeeds only on managed textures (see Remarks).
HRESULT SetLOD( DWORD dwMaxLOD );
If the method succeeds, the return value is DD_OK.
If it fails, the method can return one of the following values:
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
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 return DDERR_INVALIDOBJECT.
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, setting dwMaxLOD to 2 indicates that the texture manager should load only 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, setting the maximum level to 2 means that the largest mipmap ever present in video memory has dimensions 64×64.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in ddraw.h.
IDirectDrawSurface7::GetLOD, Texture Filtering With Mipmaps, Automatic Texture Management, Textures