Version 4 (modified by TDannhauer, 3 years ago)

Added 3rdParty Package Variable.

Environment variables

(Wiki editing note: Add short descriptions, refer to other pages for more exhaustive descriptions)
(Wiki editing note: Add 2.x variables and indicate which ones are deprecated)
(Wiki editing note: Add all defaults)

Below follows a list of settings that are externally configurable as environment variables. Often these variables can be overridden from the application command line (for instance see osgviewer).

Note:

  • Some variable have variants with different naming schemes (eg. with and without underscore)
  • Some values have different naming schemes (eg. uppercase and lowercase)
  • For bit flag variables (for instance OSG_OPTIMIZER) you can enter multiple values. Use tilde (~) to remove a specific bit.

Currently based on version 1.2 source code search.

CullSettings

OSG_COMPUTE_NEAR_FAR_MODE (enum)

  • DO_NOT_COMPUTE_NEAR_FAR
  • COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES
  • COMPUTE_NEAR_FAR_USING_PRIMITIVES

OSG_NEAR_FAR_RATIO (float)

DisplaySettings

OSG_DISPLAY_TYPE (enum)

  • MONITOR
  • POWERWALL
  • REALITY_CENTER
  • HEAD_MOUNTED_DISPLAY

See Stereo Settings for more info on the following settings:

OSG_STEREO_MODE (enum)

  • OSG_STEREO_MODE
  • QUAD_BUFFER
  • ANAGLYPHIC
  • HORIZONTAL_SPLIT
  • VERTICAL_SPLIT
  • LEFT_EYE
  • RIGHT_EYE
  • HORIZONTAL_INTERLACE
  • VERTICAL_INTERLACE

OSG_STEREO (enum)

  • OFF
  • ON

OSG_EYE_SEPARATION (float)

OSG_SCREEN_WIDTH (float)

OSG_SCREEN_HEIGHT (float)

OSG_SCREEN_DISTANCE (float)

OSG_SPLIT_STEREO_HORIZONTAL_EYE_MAPPING (enum)

  • LEFT_EYE_LEFT_VIEWPORT
  • LEFT_EYE_RIGHT_VIEWPORT

OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION (integer)

OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING (enum)

  • LEFT_EYE_TOP_VIEWPORT
  • LEFT_EYE_BOTTOM_VIEWPORT

OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO (enum)

  • OFF
  • ON

OSG_SPLIT_STEREO_VERTICAL_SEPARATION (integer)

OSG_MAX_NUMBER_OF_GRAPHICS_CONTEXTS (integer)

GLExtensions

OSG_GL_EXTENSION_DISABLE (string)

Notify

OSG_NOTIFY_LEVEL or OSGNOTIFYLEVEL (enum)

  • ALWAYS
  • FATAL
  • WARN
  • NOTICE
  • DEBUG_INFO
  • DEBUG_FP
  • DEBUG
  • INFO, will also enable validation of shader programs

Referenced

OSG_THREAD_SAFE_REF_UNREF (boolean)

Texture

OSG_MAX_TEXTURE_SIZE (integer)

DatabasePager

OSG_DATABASE_PAGER_GEOMETRY or OSG_DATABASE_PAGER_DRAWABLE (enum)

  • DoNotModify
  • DisplayList or DL
  • VBO
  • VertexArrays or VA

OSG_DO_PRE_COMPILE (enum)

  • yes, YES, on, ON

OSG_MINIMUM_COMPILE_TIME_PER_FRAME (float)

OSG_MAXIMUM_OBJECTS_TO_COMPILE_PER_FRAME (integer)

Registry

OSG_OPEN_FLIGHT_PLUGIN (enum)

  • new

OSG_FILE_PATH or OSGFILEPATH (string)

OSG_LIBRARY_PATH or OSG_LD_LIBRARY_PATH (string)

DriveManipulator

OSG_DRIVE_MANIPULATOR_HEIGHT (float) (default 1.5)

ReaderWriterNET

OSG_PROXY_HOST (string)

OSG_PROXY_PORT (integer)

TXPParser

OSG_TXP_DEFAULT_MAX_ANISOTROPY (float) (default 1.0)

ReaderWriterXine

OSG_XINE_AUDIO_DRIVER (string) (default "auto")

Producer

PRODUCER_CAMERA_CONFIG_FILE (string)

OSG_CAMERA_THREADING

  • SingleThreaded
  • ThreadPerCamera

OSG_SHARE_GRAPHICS_CONTEXTS (enum)

  • ON
  • OFF

OSG_PROCESSOR_AFFINITY (enum) (default: false)

  • ON, On, on

Viewer

OSG_IMAGE_FILE_NAME (string) (default "saved_image.jpg")

OpenFlightOptimizer

OSG_FLIGHTUTIL_OPTIMIZER (bit flags)

  • OFF
  • DEFAULT
  • TESSELATE_POLYGON
  • MAKE_LIT
  • MERGE_GEODES

Font

OSG_TEXT_INCREMENTAL_SUBLOADING (enum)

  • OFF, Off, off

Optimizer

See Optimizer Options for more info on the following settings:

OSG_OPTIMIZER (bit flags)

  • OFF
  • DEFAULT
  • FLATTEN_STATIC_TRANSFORMS
  • REMOVE_REDUNDANT_NODES
  • REMOVE_LOADED_PROXY_NODES
  • COMBINE_ADJACENT_LODS
  • SHARE_DUPLICATE_STATE
  • MERGE_GEODES
  • MERGE_GEOMETRY
  • SPATIALIZE_GROUPS
  • COPY_SHARED_NODES
  • TESSELATE_GEOMETRY
  • TRISTRIP_GEOMETRY
  • OPTIMIZE_TEXTURE_SETTINGS
  • CHECK_GEOMETRY
  • FLATTEN_BILLBOARDS
  • TEXTURE_ATLAS_BUILDER

RenderBin

OSG_DEFAULT_BIN_SORT_MODE (enum)

  • SORT_BY_STATE
  • SORT_BY_STATE_THEN_FRONT_TO_BACK
  • SORT_FRONT_TO_BACK
  • SORT_BACK_TO_FRONT

OUTPUT_THREADLIB_SCHEDULING_INFO (boolean)

Camera

PRODUCER_CAMERA_BLOCK_ON_VSYNC (boolean)

CameraConfig

PRODUCER_CONFIG_FILE_PATH (string)

PRODUCER_CAMERA_CONFIG_FILE or PRODUCER_CONFIG_FILE (string)

PRODUCER_CAMERA_BLOCK_ON_VSYNC (boolean)

PRODUCER_THREAD_MODEL (enum)

  • SingleThreaded
  • ThreadPerRenderSurface
  • ThreadPerCamera

Cameragroup

PRODUCER_STACK_SIZE (integer)

RenderSurface

PRODUCER_OVERRIDE_REDIRECT (enum)

  • true, True, TRUE

Examples

osghanglide GliderManipulator

OSGHANGGLIDE_REVERSE_CONTROLS (boolean)

3rdParty Package for VS 2008 (Sp1)

OSG_3RDPARTY_DIR (Path to package root) - This variable helps CMake to find your package and configure OSG according to your selected architecture (x86/x64).