Difference between revisions of "(Image):setMipmapFilter"

m
(Replaced with Texture:setMipmapFilter)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{newin|[[0.9.0]]|090|type=function}}
 
Sets the mipmap filter mode for an Image.
 
  
[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]].}}
 
 
== Function ==
 
Automatically creates mipmaps for the Image if none exist yet. If the image is [[(Image):isCompressed|compressed]] and its [[CompressedData]] has mipmap data included, it will use that.
 
=== Synopsis ===
 
<source lang="lua">
 
Image:setMipmapFilter( filtermode, sharpness )
 
</source>
 
=== Arguments ===
 
{{param|FilterMode|filtermode|The filter mode to use in between mipmap levels. "nearest" will often give better performance.}}
 
{{param|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 ===
 
<source lang="lua">
 
Image:setMipmapFilter( )
 
</source>
 
=== Arguments ===
 
None.
 
=== Returns ===
 
Nothing.
 
 
== See Also ==
 
* [[parent::Image]]
 
* [[(Image):getMipmapFilter|Image:getMipmapFilter]]
 
[[Category:Functions]]
 
{{#set:Description=Sets the mipmap filter mode for an Image.}}
 
== Other Languages ==
 
{{i18n|(Image):setMipmapFilter}}
 

Latest revision as of 02:56, 5 April 2018