mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Engine: Clean up texcache_enabled.
git-svn-id: https://svn.eduke32.com/eduke32@5673 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3bbe30a6f8
commit
84c949c419
3 changed files with 19 additions and 12 deletions
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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"))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue