From 08ed9861b9bac78751b8ff761a38d8a7f671e546 Mon Sep 17 00:00:00 2001 From: JuiceyDev Date: Fri, 27 Mar 2026 11:00:36 +0100 Subject: [PATCH] batch 2.3 enabling back optimizations --- Minecraft.Client/Platform/Linux/Linux_UIController.cpp | 2 ++ Minecraft.Client/Rendering/GameRenderer.cpp | 2 +- Minecraft.Client/Textures/Textures.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/Platform/Linux/Linux_UIController.cpp b/Minecraft.Client/Platform/Linux/Linux_UIController.cpp index f4a1c033a..a8da75b1d 100644 --- a/Minecraft.Client/Platform/Linux/Linux_UIController.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_UIController.cpp @@ -35,6 +35,8 @@ static void restoreFixedFunctionStateAfterIggy() { RenderManager.MatrixMode(GL_MODELVIEW); RenderManager.Set_matrixDirty(); + Minecraft::GetInstance()->textures->clearLastBoundId(); + // 4jcraft: clears the last bound id, dumb fix but fine } void ConsoleUIController::init(S32 w, S32 h) { diff --git a/Minecraft.Client/Rendering/GameRenderer.cpp b/Minecraft.Client/Rendering/GameRenderer.cpp index 3e5763087..9b9759704 100644 --- a/Minecraft.Client/Rendering/GameRenderer.cpp +++ b/Minecraft.Client/Rendering/GameRenderer.cpp @@ -1778,7 +1778,7 @@ void GameRenderer::renderSnowAndRain(float a) { yy1 * s / 4.0f + ra * s); #endif t->offset(0, 0, 0); - t->end(); + } else { if (mode != 1) { if (mode >= 0) t->end(); diff --git a/Minecraft.Client/Textures/Textures.cpp b/Minecraft.Client/Textures/Textures.cpp index 37f99f1ca..cad870918 100644 --- a/Minecraft.Client/Textures/Textures.cpp +++ b/Minecraft.Client/Textures/Textures.cpp @@ -541,11 +541,11 @@ void Textures::bindTextureLayers(ResourceLocation* resource) { } void Textures::bind(int id) { - // if (id != lastBoundId) + if (id != lastBoundId) { if (id < 0) return; glBindTexture(GL_TEXTURE_2D, id); - // lastBoundId = id; + lastBoundId = id; } }