From 1df6c4d4da7e2f2a70d2078d1329a44646bc455c Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 10 Apr 2024 17:47:37 +0200 Subject: [PATCH] move this to first init too --- src/sdl/ogl_sdl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index a65a708ee..1d30da827 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -150,7 +150,12 @@ boolean OglSdlSurface(INT32 w, INT32 h) "- GPU vendor has dropped OpenGL support on your GPU and OS. (Old GPU?)\n" "- GPU drivers are missing or broken. You may need to update your drivers."); } - + + if (majorGL == 1 && minorGL <= 3) // GL_GENERATE_MIPMAP is unavailible for OGL 1.3 and below + supportMipMap = false; + else + supportMipMap = true; + if (isExtAvailable("GL_EXT_texture_filter_anisotropic", gl_extensions)) pglGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maximumAnisotropy); else @@ -175,11 +180,6 @@ boolean OglSdlSurface(INT32 w, INT32 h) GLFramebuffer_DeleteAttachments(); } - if (majorGL == 1 && minorGL <= 3) // GL_GENERATE_MIPMAP is unavailible for OGL 1.3 and below - supportMipMap = false; - else - supportMipMap = true; - screen_width = (GLint)w; screen_height = (GLint)h;