summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-04-04 14:59:17 +0200
committerraysan5 <[email protected]>2021-04-04 14:59:17 +0200
commit66f3434571af00d945a2dcc4f0ed734afe6973d8 (patch)
tree2eadde0c14d9922a811f807971906b6a0cd4ca4a /src/core.c
parentc21baf0d92c9a3ad44d46b698fb87d739dd64dc6 (diff)
downloadraylib-66f3434571af00d945a2dcc4f0ed734afe6973d8.tar.gz
raylib-66f3434571af00d945a2dcc4f0ed734afe6973d8.zip
REDESIGNED: Shapes texture/rec moved to shapes module
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 12e7cdd1..8a34be8a 100644
--- a/src/core.c
+++ b/src/core.c
@@ -760,7 +760,10 @@ void InitWindow(int width, int height, const char *title)
LoadFontDefault();
Rectangle rec = GetFontDefault().recs[95];
// NOTE: We setup a 1px padding on char rectangle to avoid pixel bleeding on MSAA filtering
- rlSetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
+ SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
+#else
+ // Set default internal texture (1px white) and rectangle to be used for shapes drawing
+ SetShapesTexture(rlGetTextureDefault(), (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f });
#endif
#if defined(PLATFORM_DESKTOP)
if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0)
@@ -5253,7 +5256,7 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
LoadFontDefault();
Rectangle rec = GetFontDefault().recs[95];
// NOTE: We setup a 1px padding on char rectangle to avoid pixel bleeding on MSAA filtering
- rlSetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
+ SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
#endif
// TODO: GPU assets reload in case of lost focus (lost context)