Microsoft DirectX 8.1 (Visual Basic)

Direct3DBaseTexture8.SetLOD

Sets the most detailed level of detail (LOD) for a managed texture.

object.SetLOD( _ 
    LODNew As Long) As Long

Parts

object
Object expression that resolves to a Direct3DBaseTexture8 object.
LODNew
Most detailed LOD value to set for the mipmap chain.

Return Values

A Long value, clamped to the maximum LOD value (one less than the total number of levels). Subsequent calls to this method return the clamped value, not the LOD value that was previously set.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Applies To

This method applies to the following classes, which implement methods from Direct3DBaseTexture8.

Remarks

SetLOD is used for LOD control of managed textures. This method returns 0 on nonmanaged textures.

SetLOD communicates to the Microsoft® 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 256×256, setting the most detailed level to 0 indicates that 256×256 is the largest mipmap available, setting the most detailed level to 1 indicates that 128×128 is the largest mipmap available, and so on, up to the most detailed mip level (the smallest texture size) for the chain.

See Also

Direct3DBaseTexture8.GetLOD