Windows: Fix crashing when running in OpenGL 1.1 fallback mode and you enable mipmaps (Thanks popgoesme700)

This commit is contained in:
UnknownShadow200 2022-01-02 17:26:17 +11:00
parent cfb6f11dfe
commit 86f7d7c3fa

View File

@ -546,6 +546,7 @@ static void OpenGL11Fallback(void) {
"Your system only supports only OpenGL 1.1\n" \ "Your system only supports only OpenGL 1.1\n" \
"This is usually caused by graphics drivers not being installed\n\n" \ "This is usually caused by graphics drivers not being installed\n\n" \
"As such you will likely experience very poor performance"); "As such you will likely experience very poor performance");
customMipmapsLevels = false;
_glBindBuffer = fake_bindBuffer; _glDeleteBuffers = fake_deleteBuffers; _glBindBuffer = fake_bindBuffer; _glDeleteBuffers = fake_deleteBuffers;
_glGenBuffers = fake_genBuffers; _glBufferData = fake_bufferData; _glGenBuffers = fake_genBuffers; _glBufferData = fake_bufferData;
@ -582,6 +583,7 @@ static void GLBackend_Init(void) {
#ifdef CC_BUILD_WIN #ifdef CC_BUILD_WIN
LoadCoreFuncs(); LoadCoreFuncs();
#endif #endif
customMipmapsLevels = true;
/* Supported in core since 1.5 */ /* Supported in core since 1.5 */
if (major > 1 || (major == 1 && minor >= 5)) { if (major > 1 || (major == 1 && minor >= 5)) {
@ -591,7 +593,6 @@ static void GLBackend_Init(void) {
} else { } else {
OpenGL11Fallback(); OpenGL11Fallback();
} }
customMipmapsLevels = true;
} }
#endif #endif