From: Rudolf Polzer Date: Tue, 19 Jul 2016 14:00:01 +0000 (-0400) Subject: Local workarounds. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e2392574c5aa96415f2f32e572b2b763c8b890d9;p=xonotic%2Fdarkplaces.git Local workarounds. --- diff --git a/gl_textures.c b/gl_textures.c index ded21684..e5674ac7 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -107,7 +107,7 @@ static textypeinfo_t textype_rgba = {"rgba", static textypeinfo_t textype_rgba_alpha = {"rgba_alpha", TEXTYPE_RGBA , 4, 4, 4.0f, GL_RGBA , GL_RGBA , GL_UNSIGNED_BYTE }; static textypeinfo_t textype_bgra = {"bgra", TEXTYPE_BGRA , 4, 4, 4.0f, GL_RGBA , GL_BGRA , GL_UNSIGNED_BYTE }; static textypeinfo_t textype_bgra_alpha = {"bgra_alpha", TEXTYPE_BGRA , 4, 4, 4.0f, GL_RGBA , GL_BGRA , GL_UNSIGNED_BYTE }; -#ifdef __ANDROID__ +#ifdef HAVE_KTX static textypeinfo_t textype_etc1 = {"etc1", TEXTYPE_ETC1 , 1, 3, 0.5f, GL_ETC1_RGB8_OES , 0 , 0 }; #endif #else @@ -282,7 +282,7 @@ static textypeinfo_t *R_GetTexTypeInfo(textype_t textype, int flags) case TEXTYPE_PALETTE: return (flags & TEXF_ALPHA) ? &textype_palette_alpha : &textype_palette; case TEXTYPE_RGBA: return ((flags & TEXF_ALPHA) ? &textype_rgba_alpha : &textype_rgba); case TEXTYPE_BGRA: return ((flags & TEXF_ALPHA) ? &textype_bgra_alpha : &textype_bgra); -#ifdef __ANDROID__ +#ifdef HAVE_KTX case TEXTYPE_ETC1: return &textype_etc1; #endif case TEXTYPE_ALPHA: return &textype_alpha; @@ -2188,8 +2188,7 @@ int R_SaveTextureDDSFile(rtexture_t *rt, const char *filename, qboolean skipunco #endif } -#ifdef __ANDROID__ -// ELUAN: FIXME: separate this code +#ifdef HAVE_KTX #include "ktx10/include/ktx.h" #endif @@ -2213,7 +2212,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen fs_offset_t ddsfilesize; unsigned int ddssize; qboolean force_swdecode, npothack; -#ifdef __ANDROID__ +#ifdef HAVE_KTX // ELUAN: FIXME: separate this code char vabuf[1024]; char vabuf2[1024]; @@ -2224,7 +2223,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen if (cls.state == ca_dedicated) return NULL; -#ifdef __ANDROID__ +#ifdef HAVE_KTX // ELUAN: FIXME: separate this code if (vid.renderpath != RENDERPATH_GLES2) { @@ -2359,7 +2358,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen return NULL; } } -#endif // __ANDROID__ +#endif // HAVE_KTX dds = FS_LoadFile(filename, tempmempool, true, &ddsfilesize); ddssize = ddsfilesize; diff --git a/quakedef.h b/quakedef.h index 60d5db30..7e566c26 100644 --- a/quakedef.h +++ b/quakedef.h @@ -430,7 +430,8 @@ extern cvar_t sessionid; # define LINK_TO_ZLIB 1 # define LINK_TO_LIBVORBIS 1 # define DP_MOBILETOUCH 1 -# define DP_FREETYPE_STATIC 1 +//# define DP_FREETYPE_STATIC 1 +//# define HAVE_KTX 1 #elif TARGET_OS_IPHONE /* must come first because it also defines MACOSX */ # define DP_OS_NAME "iPhoneOS" # define DP_OS_STR "iphoneos"