diff options
| author | raysan5 <[email protected]> | 2021-04-04 14:59:17 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-04-04 14:59:17 +0200 |
| commit | 66f3434571af00d945a2dcc4f0ed734afe6973d8 (patch) | |
| tree | 2eadde0c14d9922a811f807971906b6a0cd4ca4a /src/core.c | |
| parent | c21baf0d92c9a3ad44d46b698fb87d739dd64dc6 (diff) | |
| download | raylib-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) |
