From 5d64fbb6ac23a4413d8d38ea32a39267141908c0 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 29 Sep 2019 23:19:14 +1000 Subject: [PATCH] Attempt to fix texture warping of bedrock outside map at certain angles with 4096 render distance (thanks tornato) Done by breaking down into 2048x2048 instead of 65536x65536 quads at most --- src/EnvRenderer.c | 2 +- src/Window.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EnvRenderer.c b/src/EnvRenderer.c index 34c9258f4..7a615581a 100644 --- a/src/EnvRenderer.c +++ b/src/EnvRenderer.c @@ -29,7 +29,7 @@ static float EnvRenderer_BlendFactor(float x) { return (float)blend; } -#define EnvRenderer_AxisSize() (EnvRenderer_Legacy ? 128 : 65536) +#define EnvRenderer_AxisSize() (EnvRenderer_Legacy ? 128 : 2048) /* Returns the number of vertices needed to subdivide a quad */ static int EnvRenderer_Vertices(int axis1Len, int axis2Len) { int axisSize = EnvRenderer_AxisSize(); diff --git a/src/Window.c b/src/Window.c index 978f23ea7..d32827247 100644 --- a/src/Window.c +++ b/src/Window.c @@ -2047,6 +2047,7 @@ static void Window_ConnectEvents(void) { /* However, we cannot use that since the event loop is managed by us instead. */ /* Unfortunately, there is no proper API to duplicate that behaviour, so reply */ /* on the undocumented GetMenuBarEventTarget to achieve similar behaviour. */ + /* TODO: Use DynamicLib API instead of dlsym */ getMenuBarEventTarget = dlsym(RTLD_DEFAULT, "GetMenuBarEventTarget"); InstallStandardEventHandler(GetApplicationEventTarget());