Make texture compression optional.
Two variants: 1. Use the --notexturecompression command line option. 2. Put "notexturecompression=1" into the config file. Can be overridden with the --texturecompression command line option. Closes #2864.master
parent
6465d7287d
commit
73c1d98637
|
@ -71,6 +71,11 @@ work anymore.
|
|||
*--(no)sound*::
|
||||
Toggle the sound.
|
||||
|
||||
*--(no)texturecompression*::
|
||||
Toggle texture compression (default on). At least on systems where Mesa's
|
||||
libtxc-dxtn handles texture compression, loading is slower with it enabled.
|
||||
In-game FPS are also higher though.
|
||||
|
||||
The fullscreen/window, resolution, sound, and shadows settings are
|
||||
stored, so they only need to be specified once, or when you want to
|
||||
change them.
|
||||
|
|
|
@ -53,7 +53,7 @@ bool pie_Initialise(void)
|
|||
pie_TexInit();
|
||||
|
||||
/* Find texture compression extension */
|
||||
if (GLEW_ARB_texture_compression)
|
||||
if (GLEW_ARB_texture_compression && wz_texture_compression != GL_RGBA)
|
||||
{
|
||||
debug(LOG_TEXTURE, "Texture compression: Yes");
|
||||
wz_texture_compression = GL_COMPRESSED_RGBA_ARB;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "src/levels.h"
|
||||
|
||||
/* global used to indicate preferred internal OpenGL format */
|
||||
int wz_texture_compression;
|
||||
int wz_texture_compression = 0;
|
||||
|
||||
static bool bBackDrop = false;
|
||||
static char screendump_filename[PATH_MAX];
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#endif
|
||||
|
||||
#include "lib/framework/types.h"
|
||||
#include "lib/framework/vector.h"
|
||||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
*/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/opengl.h"
|
||||
#include "lib/ivis_opengl/screen.h"
|
||||
#include "lib/netplay/netplay.h"
|
||||
|
||||
#include "clparse.h"
|
||||
|
@ -229,6 +231,8 @@ typedef enum
|
|||
CLI_HOSTLAUNCH,
|
||||
CLI_NOASSERT,
|
||||
CLI_CRASH,
|
||||
CLI_TEXTURECOMPRESSION,
|
||||
CLI_NOTEXTURECOMPRESSION,
|
||||
} CLI_OPTIONS;
|
||||
|
||||
static const struct poptOption* getOptionsTable(void)
|
||||
|
@ -259,6 +263,8 @@ static const struct poptOption* getOptionsTable(void)
|
|||
{ "selftest", '\0', POPT_ARG_NONE, NULL, CLI_SELFTEST, N_("Activate self-test"), NULL },
|
||||
{ "join", '\0', POPT_ARG_STRING, NULL, CLI_CONNECTTOIP,N_("connect directly to IP/hostname"), N_("host") },
|
||||
{ "host", '\0', POPT_ARG_NONE, NULL, CLI_HOSTLAUNCH, N_("go directly to host screen"), NULL },
|
||||
{ "texturecompression", '\0', POPT_ARG_NONE, NULL, CLI_TEXTURECOMPRESSION, N_("Enable texture compression"), NULL },
|
||||
{ "notexturecompression", '\0', POPT_ARG_NONE, NULL, CLI_NOTEXTURECOMPRESSION, N_("Disable texture compression"), NULL },
|
||||
// Terminating entry
|
||||
{ NULL, '\0', 0, NULL, 0, NULL, NULL },
|
||||
};
|
||||
|
@ -587,6 +593,14 @@ bool ParseCommandLine(int argc, const char** argv)
|
|||
case CLI_SELFTEST:
|
||||
selfTest = true;
|
||||
break;
|
||||
|
||||
case CLI_TEXTURECOMPRESSION:
|
||||
wz_texture_compression = GL_COMPRESSED_RGBA_ARB;
|
||||
break;
|
||||
|
||||
case CLI_NOTEXTURECOMPRESSION:
|
||||
wz_texture_compression = GL_RGBA;
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ bool loadConfig()
|
|||
if (ini.contains("music_enabled")) war_SetMusicEnabled(ini.value("music_enabled").toBool());
|
||||
if (ini.contains("language")) setLanguage(ini.value("language").toString().toUtf8().constData());
|
||||
if (ini.contains("nomousewarp")) setMouseWarp(ini.value("nomousewarp").toBool());
|
||||
if (ini.contains("notexturecompression")) wz_texture_compression = GL_RGBA;
|
||||
showFPS = ini.value("showFPS", false).toBool();
|
||||
scroll_speed_accel = ini.value("scroll", DEFAULTSCROLL).toInt();
|
||||
setShakeStatus(ini.value("shake", false).toBool());
|
||||
|
|
Loading…
Reference in New Issue