From 86f7d7c3fafc706434a40251e2d2fa15d565c0e3 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 2 Jan 2022 17:26:17 +1100 Subject: [PATCH] Windows: Fix crashing when running in OpenGL 1.1 fallback mode and you enable mipmaps (Thanks popgoesme700) --- src/Graphics_GL1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Graphics_GL1.c b/src/Graphics_GL1.c index 39b146316..54561933a 100644 --- a/src/Graphics_GL1.c +++ b/src/Graphics_GL1.c @@ -546,6 +546,7 @@ static void OpenGL11Fallback(void) { "Your system only supports only OpenGL 1.1\n" \ "This is usually caused by graphics drivers not being installed\n\n" \ "As such you will likely experience very poor performance"); + customMipmapsLevels = false; _glBindBuffer = fake_bindBuffer; _glDeleteBuffers = fake_deleteBuffers; _glGenBuffers = fake_genBuffers; _glBufferData = fake_bufferData; @@ -582,6 +583,7 @@ static void GLBackend_Init(void) { #ifdef CC_BUILD_WIN LoadCoreFuncs(); #endif + customMipmapsLevels = true; /* Supported in core since 1.5 */ if (major > 1 || (major == 1 && minor >= 5)) { @@ -591,7 +593,6 @@ static void GLBackend_Init(void) { } else { OpenGL11Fallback(); } - customMipmapsLevels = true; } #endif