diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 8030c8bcb..413909dc1 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -1313,6 +1313,15 @@ void sdlayer_setvideomode_opengl(void) glinfo.fbos = !!Bstrstr(glinfo.extensions, "GL_EXT_framebuffer_object") || !!Bstrstr(glinfo.extensions, "GL_OES_framebuffer_object"); #ifndef __ANDROID__ +# ifdef DYNAMIC_GLEXT + if (glinfo.texcompr && (!bglCompressedTexImage2DARB || !bglGetCompressedTexImageARB)) + { + // lacking the necessary extensions to do this + initprintf("Warning: the GL driver lacks necessary functions to use caching\n"); + glinfo.texcompr = 0; + } +# endif + glinfo.bgra = !!Bstrstr(glinfo.extensions, "GL_EXT_bgra"); glinfo.clamptoedge = !!Bstrstr(glinfo.extensions, "GL_EXT_texture_edge_clamp") || !!Bstrstr(glinfo.extensions, "GL_SGIS_texture_edge_clamp"); diff --git a/polymer/eduke32/build/src/texcache.c b/polymer/eduke32/build/src/texcache.c index be12e252a..3b987e0f9 100644 --- a/polymer/eduke32/build/src/texcache.c +++ b/polymer/eduke32/build/src/texcache.c @@ -287,19 +287,8 @@ static int32_t texcache_enabled(void) #if defined EDUKE32_GLES || !defined USE_GLEXT return 0; #else - if (!glusetexcompr || !glusetexcache) return 0; - - if (!glinfo.texcompr -# ifdef DYNAMIC_GLEXT - || !bglCompressedTexImage2DARB || !bglGetCompressedTexImageARB -# endif - ) - { - // lacking the necessary extensions to do this - OSD_Printf("Warning: the GL driver lacks necessary functions to use caching\n"); - glusetexcache = 0; + if (!glinfo.texcompr || !glusetexcompr || !glusetexcache) return 0; - } if (!texcache.index || texcache.filehandle < 0) { diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index 8cdd27fc6..58ad8c12a 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -2891,6 +2891,15 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp) { // support texture compression glinfo.texcompr = 1; + +#ifdef DYNAMIC_GLEXT + if (!bglCompressedTexImage2DARB || !bglGetCompressedTexImageARB) + { + // lacking the necessary extensions to do this + initprintf("Warning: the GL driver lacks necessary functions to use caching\n"); + glinfo.texcompr = 0; + } +#endif } else if (!Bstrcmp((char *)p2, "GL_ARB_texture_non_power_of_two")) {