Difference between revisions of "(Image):setMipmapFilter"

m
m
Line 4: Line 4:
 
[http://en.wikipedia.org/wiki/Mipmap Mipmapping] is useful when drawing an image at a reduced scale. It can improve performance and reduce aliasing issues.
 
[http://en.wikipedia.org/wiki/Mipmap Mipmapping] is useful when drawing an image at a reduced scale. It can improve performance and reduce aliasing issues.
  
{{notice|Due to hardware restrictions and driver bugs, only images with power-of-two dimensions (64x64, 512x256, etc.) can have mipmap filtering enabled, unless the image was loaded from a [[CompressedData]].}}
+
{{notice|Due to hardware restrictions and driver bugs, images that weren't loaded from a [[CompressedData]] must have power-of-two dimensions (64x64, 512x256, etc.) to support mipmaps and mipmap filtering.}}
  
 
== Function ==
 
== Function ==

Revision as of 00:38, 2 March 2015

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Sets the mipmap filter mode for an Image.

Mipmapping is useful when drawing an image at a reduced scale. It can improve performance and reduce aliasing issues.

O.png Due to hardware restrictions and driver bugs, images that weren't loaded from a CompressedData must have power-of-two dimensions (64x64, 512x256, etc.) to support mipmaps and mipmap filtering.  


Function

Automatically creates mipmaps for the Image if none exist yet. If the image is compressed and its CompressedData has mipmap data included, it will use that.

Synopsis

Image:setMipmapFilter( filtermode, sharpness )

Arguments

FilterMode filtermode
The filter mode to use in between mipmap levels. "nearest" will often give better performance.
number sharpness (0)
A positive sharpness value makes the image use a more detailed mipmap level when drawing, at the expense of performance. A negative value does the reverse.

Returns

Nothing.

Function

Disables mipmap filtering.

Synopsis

Image:setMipmapFilter( )

Arguments

None.

Returns

Nothing.

See Also

Other Languages