From 96609e45aeaf7baf05c6ad5bab665cd3f66a0ec9 Mon Sep 17 00:00:00 2001
From: Jaime Passos <lazymyuutsu@gmail.com>
Date: Fri, 27 Dec 2019 00:02:30 -0300
Subject: [PATCH] OpenGL funny

---
 src/hardware/hw_cache.c | 4 ----
 src/r_main.c            | 4 +---
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c
index 6f375bdab8..c47833187b 100644
--- a/src/hardware/hw_cache.c
+++ b/src/hardware/hw_cache.c
@@ -888,10 +888,6 @@ GLTexture_t *HWR_GetTexture(INT32 tex)
 		I_Error("HWR_GetTexture: tex >= numtextures\n");
 #endif
 
-	// Lactozilla: Renderer switching
-	if (needpatchrecache && (!gr_textures))
-		HWR_LoadTextures(gr_numtextures);
-
 	// Every texture in memory, stored in the
 	// hardware renderer's bit depth format. Wow!
 	grtex = &gr_textures[tex];
diff --git a/src/r_main.c b/src/r_main.c
index 7134803979..38777a521b 100644
--- a/src/r_main.c
+++ b/src/r_main.c
@@ -1162,11 +1162,9 @@ void R_InitHardwareMode(void)
 {
 	HWR_AddSessionCommands();
 	HWR_Switch();
+	HWR_LoadTextures(numtextures);
 	if (gamestate == GS_LEVEL || (gamestate == GS_TITLESCREEN && titlemapinaction))
-	{
 		HWR_SetupLevel();
-		HWR_LoadTextures(numtextures);
-	}
 }
 #endif
 
-- 
GitLab