mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Fix the default mipmap filter of mipmapped Canvases (thanks Shell32).
--HG-- branch : minor
This commit is contained in:
@@ -65,7 +65,11 @@ Canvas::Canvas(const Settings &settings)
|
|||||||
if ((!readable || settings.msaa > 1) && settings.mipmaps != MIPMAPS_NONE)
|
if ((!readable || settings.msaa > 1) && settings.mipmaps != MIPMAPS_NONE)
|
||||||
throw love::Exception("Non-readable and MSAA textures cannot have mipmaps.");
|
throw love::Exception("Non-readable and MSAA textures cannot have mipmaps.");
|
||||||
|
|
||||||
mipmapCount = settings.mipmaps == MIPMAPS_NONE ? 1 : getMipmapCount(pixelWidth, pixelHeight);
|
if (settings.mipmaps != MIPMAPS_NONE)
|
||||||
|
{
|
||||||
|
mipmapCount = getMipmapCount(pixelWidth, pixelHeight);
|
||||||
|
filter.mipmap = defaultMipmapFilter;
|
||||||
|
}
|
||||||
|
|
||||||
canvasCount++;
|
canvasCount++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -822,7 +822,7 @@ protected:
|
|||||||
|
|
||||||
Texture::Filter defaultFilter = Texture::Filter();
|
Texture::Filter defaultFilter = Texture::Filter();
|
||||||
|
|
||||||
Texture::FilterMode defaultMipmapFilter = Texture::FILTER_NEAREST;
|
Texture::FilterMode defaultMipmapFilter = Texture::FILTER_LINEAR;
|
||||||
float defaultMipmapSharpness = 0.0f;
|
float defaultMipmapSharpness = 0.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user