Fix #3247
This commit is contained in:
parent
8a82e17a79
commit
bdda1efd44
1 changed files with 12 additions and 2 deletions
14
src/rcore.c
14
src/rcore.c
|
@ -887,9 +887,19 @@ void InitWindow(int width, int height, const char *title)
|
||||||
// WARNING: External function: Module required: rtext
|
// WARNING: External function: Module required: rtext
|
||||||
LoadFontDefault();
|
LoadFontDefault();
|
||||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||||
|
// Set font white rectangle for shapes drawing, so shapes and text can be batched together
|
||||||
|
// WARNING: rshapes module is required, if not available, default internal white rectangle is used
|
||||||
Rectangle rec = GetFontDefault().recs[95];
|
Rectangle rec = GetFontDefault().recs[95];
|
||||||
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding on MSAA filtering
|
if (CORE.Window.flags & FLAG_MSAA_4X_HINT)
|
||||||
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 }); // WARNING: Module required: rshapes
|
{
|
||||||
|
// NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering
|
||||||
|
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 2, rec.y + 2, 1, 1 });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding
|
||||||
|
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue