Environment Variables: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
(→‎Other: link to paths)
Line 38: Line 38:
= Other =
= Other =


There are some OS-specific environment variables that may affect OpenMW. For example, on Linux, the path to OpenMW's config directory can be changed with 'XDG_CONFIG_HOME'.
There are some OS-specific environment variables that may affect OpenMW. For example, on Linux, the configuration [[Paths|paths]] can be changed with XDG_CONFIG_HOME and XDG_DATA_HOME.

Revision as of 00:07, 10 March 2018

There are several environment variables that can be used to change the way OpenMW behaves, for debugging or to test experimental functionality. These variables are not officially supported and not intended for end users. Use at your own risk!

OpenMW

Name Description
OPENMW_DECOMPRESS_TEXTURES If set, and the graphics hardware does not support S3TC-compressed textures, S3TC textures will be decompressed in software. Allows running Morrowind on platforms not supporting S3TC like Raspberry PI. This option is not enabled by default and must be switched on by environment variable because it only works with sufficiently new versions of OSG (3.6 or OpenMW/OSG fork).
OPENMW_CURSOR_WORKAROUND Only affects Mac OS. If set (0 or 1), controls whether or not cursors will be flipped on loading. This may be required due to an apparant bug in some (but not all) Mac OS video drivers. If not set, OpenMW attempts to guess whether or not to flip cursors based on video hardware.
OPENMW_OPTIMIZE Controls which optimizations are used when loading meshes. Disabling optimization(s) may be useful to narrow down optimizer-related bugs. By default, all optimizations are used. Use '0' or 'OFF' to disable them all or use bitflags, see Rendering Architecture#Optimizer.
OPENMW_DONT_PRECOMPILE If set, disables the use of osgUtil::IncrementalCompileOperation which incrementally pre-loads OpenGL objects that are not yet visible. This flag may be useful for debugging whether or not an issue is caused by this operation.
OPENMW_PHYSICS_FPS If set to a floating point number, overrides the physics framerate from its default of 60. May be useful to run OpenMW on systems that are unable to keep up with 60 physics frames / second and hence spiral to a halt. The effects of using a lower framerate have not been extensively tested.

OpenScenegraph

Being an OpenSceneGraph application, OpenMW accepts any environment variable used by OpenSceneGraph.

Incomplete documentation on these may be found on the OSG web site: UserGuides/EnvironmentVariables. The remaining variables can be found by searching for 'getenv' in the OSG source code.

Some variables will have no effect because OpenMW explicitely opts for different values at runtime, or because they affect a feature that OpenMW does not use.

Interesting variables:

  • OSG_THREADING (set to 'SingleThreaded' to rule out threading issues while debugging)
  • OSG_NOTIFY_LEVEL

Other

There are some OS-specific environment variables that may affect OpenMW. For example, on Linux, the configuration paths can be changed with XDG_CONFIG_HOME and XDG_DATA_HOME.