rcore.c : flags to control texture font linear filtering - part 2
When in `FLAT_RESCALE_CONTENT` mode, the default "nearest pixel" filter of the texture font is ugly sometimes. So this change adds `FLAG_RESCALE_CONTENT_LINEAR` and `FLAG_TEXT_LINEAR_FILTER` to offer more control. `FLAG_TEXT_LINEAR_FILTER` can also be used to disable the linear filtering of `FLAG_WINDOW_HIGHDPI`.
This commit is contained in:
parent
0882f153d4
commit
4ae3e555ed
|
|
@ -677,7 +677,7 @@ void InitWindow(int width, int height, const char *title)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
|
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
|
||||||
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0)
|
if (((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) || ((CORE.Window.flags & FLAG_TEXT_LINEAR_FILTER) > 0))
|
||||||
{
|
{
|
||||||
// Set default font texture filter for HighDPI (blurry)
|
// Set default font texture filter for HighDPI (blurry)
|
||||||
// RL_TEXTURE_FILTER_LINEAR - tex filter: BILINEAR, no mipmaps
|
// RL_TEXTURE_FILTER_LINEAR - tex filter: BILINEAR, no mipmaps
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user