bmap_to_mipmap(BMAP*)
Creates a chain of mipmaps for the given bmap, or updates the mipmaps when they
already exist.
Can
be
used
to
create mipmaps for textures that are used by effect scripts, or for updating
the mipmaps
when
a bitmap
was modified.
Parameters:
BMAP* - bitmap pointer
Returns:
NULL if the mipmap creation failed, otherwise BMAP*.
Speed:
Slow
Remarks:
-
If the texture had no mipmaps before, modified texture content gets lost when creating the mipmap chain the first time. Thus, create the mipmaps before modifying the texture, and call bmap_to_mipmap afterwards a second time for updating the modified content to the other mipmaps.
- This function can not be applied to compressed (DDS), cubic, normal,
tangent,
rendertarget, or
other
special
bitmaps. If required,
create
the
mipmaps before converting
the bitmap to a special format (for instance bmap_to_cubemap(bmap_to_mipmap(skymap)).
Creating mipmaps afterwards will otherwise render the special bitmap unusable.
Example:
// create a mipmapped normals map for bumpmapping
bmap_to_normals(bmap_to_mipmap(material_bump.skin1),2);
See also:
bmap_to_normals, bmap_to_uv
, pixel_to_bmap
► latest
version online