From 2a295d434e39ef346aaa4241b19938ba0a7ce419 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sun, 6 Jul 2003 11:13:14 +0000 Subject: [PATCH] Added rend-tex-external-always --- doomsday/Include/gl_tex.h | 1 + doomsday/Src/con_console.c | 1 + doomsday/Src/gl_tex.c | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doomsday/Include/gl_tex.h b/doomsday/Include/gl_tex.h index 159138dde5..922aea69e3 100644 --- a/doomsday/Include/gl_tex.h +++ b/doomsday/Include/gl_tex.h @@ -21,6 +21,7 @@ typedef struct image_s { } image_t; extern int mipmapping, linearRaw, texQuality, filterSprites; +extern boolean loadExtAlways; extern float texw, texh; extern int texmask; extern detailinfo_t *texdetail; diff --git a/doomsday/Src/con_console.c b/doomsday/Src/con_console.c index 9176d13781..ad1b471c15 100644 --- a/doomsday/Src/con_console.c +++ b/doomsday/Src/con_console.c @@ -323,6 +323,7 @@ cvar_t engineCVars[] = "rend-tex-gamma", CVF_PROTECTED, CVT_INT, &usegamma, 0, 4, "The gamma correction level (0-4).", "rend-tex-mipmap", CVF_PROTECTED, CVT_INT, &mipmapping, 0, 5, "The mipmapping mode for textures.", "rend-tex-paletted", CVF_PROTECTED, CVT_BYTE, &paletted, 0, 1, "1=Use the GL_EXT_shared_texture_palette extension.", + "rend-tex-external-always", 0, CVT_BYTE, &loadExtAlways, 0, 1, "1=Always use external texture resources (overrides -pwadtex).", "rend-tex-quality", 0, CVT_INT, &texQuality, 0, 8, "The quality of textures (0-8).", "rend-tex-filter-sprite", 0, CVT_INT, &filterSprites, 0, 1, "1=Render smooth sprites.", "rend-tex-filter-raw", CVF_PROTECTED, CVT_INT, &linearRaw, 0, 1, "1=Fullscreen images (320x200) use linear interpolation.", diff --git a/doomsday/Src/gl_tex.c b/doomsday/Src/gl_tex.c index 1d605c46b1..ad838bc0ec 100644 --- a/doomsday/Src/gl_tex.c +++ b/doomsday/Src/gl_tex.c @@ -89,6 +89,7 @@ extern boolean s3tcAvailable; // PUBLIC DATA DEFINITIONS ------------------------------------------------- boolean filloutlines = true; +boolean loadExtAlways = false; // Always check for extres (cvar) boolean paletted = false; // Use GL_EXT_paletted_texture (cvar) boolean load8bit = false; // Load textures as 8 bit? (with paltex) @@ -1746,7 +1747,7 @@ unsigned int GL_PrepareTexture(int idx) if(!textures[idx]->tex) { // Try to load a high resolution version of this texture. - if((highResWithPWAD || !R_IsCustomTexture(idx)) + if((loadExtAlways || highResWithPWAD || !R_IsCustomTexture(idx)) && GL_LoadHighResTexture(&image, tex->name) != NULL) { // High resolution texture loaded. @@ -2015,7 +2016,7 @@ unsigned int GL_PrepareSky(int idx, boolean zeroMask) if(!textures[idx]->tex) { // Try to load a high resolution version of this texture. - if((highResWithPWAD || !R_IsCustomTexture(idx)) + if((loadExtAlways || highResWithPWAD || !R_IsCustomTexture(idx)) && GL_LoadHighResTexture(&image, textures[idx]->name) != NULL) { // High resolution texture loaded.