IDirect3DBaseTexture9::SetLOD method (d3d9.h)

Sets the most detailed level-of-detail for a managed texture.

Syntax

DWORD SetLOD(
  [in] DWORD LODNew
);

Parameters

[in] LODNew

Type: DWORD

Most detailed level-of-detail value to set for the mipmap chain.

Return value

Type: DWORD

A DWORD value, clamped to the maximum level-of-detail value (one less than the total number of levels). Subsequent calls to this method will return the clamped value, not the level-of-detail value that was previously set.

Remarks

This method applies to the following interfaces, which inherit from IDirect3DBaseTexture9.

SetLOD is used for level-of-detail control of managed textures. This method returns 0 on nonmanaged textures.

SetLOD communicates to the Direct3D texture manager the most detailed mipmap in the chain that should be loaded into local video memory. For example, in a five-level mipmap chain, setting LODNew to 2 indicates that the texture manager should load only mipmap levels 2 through 4 into local video memory at any given time.

More specifically, if the texture was created with the dimensions of 256x256, setting the most detailed level to 0 indicates that 256 x 256 is the largest mipmap available, setting the most detailed level to 1 indicates that 128 x 128 is the largest mipmap available, and so on, up to the most detailed mip level (the smallest texture size) for the chain.

Requirements

   
Target Platform Windows
Header d3d9.h (include D3D9.h)
Library D3D9.lib

See also

IDirect3DBaseTexture9