From fb745767f26579bb35659d8803694658d1030c92 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sat, 28 Mar 2026 03:10:19 -0500 Subject: [PATCH] undo changes to Camera.cpp --- Minecraft.Client/Rendering/Camera.cpp | 8 +++----- Minecraft.Client/Textures/Textures.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Minecraft.Client/Rendering/Camera.cpp b/Minecraft.Client/Rendering/Camera.cpp index 137108089..aac62892a 100644 --- a/Minecraft.Client/Rendering/Camera.cpp +++ b/Minecraft.Client/Rendering/Camera.cpp @@ -22,11 +22,9 @@ float Camera::xa2 = 0.0f; float Camera::za2 = 0.0f; void Camera::prepare(std::shared_ptr player, bool mirror) { - memcpy(modelview->_getDataPointer(), - RenderManager.MatrixGet(GL_MODELVIEW_MATRIX), 16 * sizeof(float)); - memcpy(projection->_getDataPointer(), - RenderManager.MatrixGet(GL_PROJECTION_MATRIX), 16 * sizeof(float)); - + glGetFloat(GL_MODELVIEW_MATRIX, modelview); + glGetFloat(GL_PROJECTION_MATRIX, projection); + /* Original java code for reference glGetInteger(GL_VIEWPORT, viewport); diff --git a/Minecraft.Client/Textures/Textures.cpp b/Minecraft.Client/Textures/Textures.cpp index 7fc2dabcf..13c76e46c 100644 --- a/Minecraft.Client/Textures/Textures.cpp +++ b/Minecraft.Client/Textures/Textures.cpp @@ -541,11 +541,13 @@ void Textures::bindTextureLayers(ResourceLocation* resource) { } void Textures::bind(int id) { - // Classic GUI code still performs some raw glBindTexture calls, so this - // path must always rebind rather than trusting lastBoundId to be in sync. + // 4jcraft: Classic GUI code still performs some raw glBindTexture calls, so + // this path must always rebind rather than trusting lastBoundId to be in sync. + // if (id != lastBoundId) { if (id < 0) return; glBindTexture(GL_TEXTURE_2D, id); + // lastBoundId = id; } }