Here are answers to some of the most often asked questions we receive. If you don’t see your answer here, contact us here.
A search of the OSG 3.2 source for “getOrCreateUniform” reveals:
src\osgUtil\SceneView.cpp(386): osg::Uniform* uniform = _localStateSet >getOrCreateUniform(“osg_FrameNumber”,osg::Uniform::UNSIGNED_INT);
src\osgUtil\SceneView.cpp(392): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_FrameTime”,osg::Uniform::FLOAT);
src\osgUtil\SceneView.cpp(401): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_DeltaFrameTime”,osg::Uniform::FLOAT);
src\osgUtil\SceneView.cpp(407): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_SimulationTime”,osg::Uniform::FLOAT);
src\osgUtil\SceneView.cpp(416): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_DeltaSimulationTime”,osg::Uniform::FLOAT);
src\osgUtil\SceneView.cpp(422): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_ViewMatrix”,osg::Uniform::FLOAT_MAT4);
src\osgUtil\SceneView.cpp(428): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_ViewMatrixInverse”,osg::Uniform::FLOAT_MAT4);
Searching the OSG source tree for ApplicationUsage::ENVIRONMENTAL_VARIABLE shows:
“OSG_CONFIG_FILE “,”Specify a viewer configuration file to load by default.”
“OSG_THREADING “,”Set the threading model using by Viewer, can be SingleThreaded, CullDrawThreadPerContext, DrawThreadPerContext or CullThreadPerCameraDrawThreadPerContext.”
“OSG_SCREEN “,”Set the default screen that windows should open up on.”
“OSG_WINDOW x y width height”,”Set the default window dimensions that windows should open up on.”
“OSG_RUN_FRAME_SCHEME”,”Frame rate manage scheme that viewer run should use, ON_DEMAND or CONTINUOUS (default).”
“OSG_RUN_MAX_FRAME_RATE”,”Set the maximum number of frame as second that viewer run. 0.0 is default and disables an frame rate capping.”
“OSG_TXP_DEFAULT_MAX_ANISOTROPY \” []\””,”1.0 | 2.0 | 4.0 | 8.0 | 16.0″
“OSG_MAX_TEXTURE_SIZE”,”Set the maximum size of textures.”
“OSG_GL_ERROR_CHECKING “,”ONCE_PER_ATTRIBUTE | ON | on enables fine grained checking, ONCE_PER_FRAME enables coarse grained checking”
“OSG_DEFAULT_BIN_SORT_MODE “,”SORT_BY_STATE | SORT_BY_STATE_THEN_FRONT_TO_BACK | SORT_FRONT_TO_BACK | SORT_BACK_TO_FRONT”
“OSG_FILE_PATH [;path]..”,”Paths for locating datafiles”
“OSG_LIBRARY_PATH [;path]..”,”Paths for locating libraries/ plugins”
“OSG_BUILD_KDTREES on/off”,”Enable/disable the automatic building of KdTrees for each loaded Geometry.”
“OSG_THREAD_SAFE_REF_UNREF”
“OSG_WRITE_OUT_DEFAULT_VALUES”, “ON | OFF”
“OSG_OPTIMIZER \” []\””,”OFF | DEFAULT | FLATTEN_STATIC_TRANSFORMS | FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS | REMOVE_REDUNDANT_NODES | COMBINE_ADJACENT_LODS | SHARE_DUPLICATE_STATE | MERGE_GEOMETRY | MERGE_GEODES | SPATIALIZE_GROUPS | COPY_SHARED_NODES | TRISTRIP_GEOMETRY | OPTIMIZE_TEXTURE_SETTINGS | REMOVE_LOADED_PROXY_NODES | TESSELLATE_GEOMETRY | CHECK_GEOMETRY | FLATTEN_BILLBOARDS | TEXTURE_ATLAS_BUILDER | STATIC_OBJECT_DETECTION | INDEX_MESH | VERTEX_POSTTRANSFORM | VERTEX_PRETRANSFORM”
“OSG_MINIMUM_COMPILE_TIME_PER_FRAME “,”minimum compile time alloted to compiling OpenGL objects per frame in database pager.”
“OSG_MAXIMUM_OBJECTS_TO_COMPILE_PER_FRAME “,”maximum number of OpenGL objects to compile per frame in database pager.”
“OSG_FORCE_TEXTURE_DOWNLOAD “,”should the texture compiles be forced to download using a dummy Geometry.”
“OSG_WIN32_NV_MULTIMON_MULTITHREAD_WORKAROUND on/off”,”Enable/disable duplicate makeCurrentContext call used as workaround for WinXP/NVidia/MultiView/MulitThread isues (pre 178.13 drivers).”
“OSG_TEXT_INCREMENTAL_SUBLOADING “,”ON | OFF”
“OSG_NOTIFY_LEVEL “, “FATAL | WARN | NOTICE | DEBUG_INFO | DEBUG_FP | DEBUG | INFO | ALWAYS”
“OSG_COMPUTE_NEAR_FAR_MODE “,”DO_NOT_COMPUTE_NEAR_FAR | COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES | COMPUTE_NEAR_FAR_USING_PRIMITIVES”
“OSG_NEAR_FAR_RATIO “,”Set the ratio between near and far planes – must greater than 0.0 but less than 1.0.”
“OSG_DO_PRE_COMPILE “,”Switch on or off the pre compile of OpenGL object database pager.”
“OSG_DATABASE_PAGER_DRAWABLE “,”Set the drawable policy for setting of loaded drawable to specified type. mode can be one of DoNotModify, DisplayList, VBO or VertexArrays>.”
“OSG_DATABASE_PAGER_PRIORITY “, “Set the thread priority to DEFAULT, MIN, LOW, NOMINAL, HIGH or MAX.”
“OSG_MAX_PAGEDLOD “,”Set the target maximum number of PagedLOD to maintain.”
“OSG_ASSIGN_PBO_TO_IMAGES “,”Set whether PixelBufferObjects should be assigned to Images to aid download to the GPU.”
“OSG_DISPLAY_TYPE “,”MONITOR | POWERWALL | REALITY_CENTER | HEAD_MOUNTED_DISPLAY”
“OSG_STEREO_MODE “,”QUAD_BUFFER | ANAGLYPHIC | HORIZONTAL_SPLIT | VERTICAL_SPLIT | LEFT_EYE | RIGHT_EYE | VERTICAL_INTERLACE | HORIZONTAL_INTERLACE”
“OSG_STEREO “,”OFF | ON”
“OSG_EYE_SEPARATION “,”Physical distance between eyes.”
“OSG_SCREEN_DISTANCE “,”Physical distance between eyes and screen.”
“OSG_SCREEN_HEIGHT “,”Physical screen height.”
“OSG_SCREEN_WIDTH “,”Physical screen width.”
“OSG_SPLIT_STEREO_HORIZONTAL_EYE_MAPPING “,”LEFT_EYE_LEFT_VIEWPORT | LEFT_EYE_RIGHT_VIEWPORT”
“OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION “,”Number of pixels between viewports.”
“OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING “,”LEFT_EYE_TOP_VIEWPORT | LEFT_EYE_BOTTOM_VIEWPORT”
“OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO “,”OFF | ON Default to ON to compensate for the compression of the aspect ratio when viewing in split screen stereo. Note, if you are setting fovx and fovy explicitly OFF should be used.”
“OSG_SPLIT_STEREO_VERTICAL_SEPARATION “,”Number of pixels between viewports.”
“OSG_MAX_NUMBER_OF_GRAPHICS_CONTEXTS “,”Maximum number of graphics contexts to be used with applications.”
“OSG_COMPILE_CONTEXTS “,”OFF | ON Disable/enable the use of background compiled contexts and threads.”
“OSG_SERIALIZE_DRAW_DISPATCH “,”OFF | ON Disable/enable the use of a mutex to serialize the draw dispatch when there are multiple graphics threads.”
“OSG_NUM_DATABASE_THREADS “,”Set the hint for the total number of threads to set up in the DatabasePager.”
“OSG_NUM_HTTP_DATABASE_THREADS “,”Set the hint for the total number of threads dedicated to http requests to set up in the DatabasePager.”
“OSG_MULTI_SAMPLES “,”Set the hint for the number of samples to use when multi-sampling.”
“OSG_TEXTURE_POOL_SIZE “,”Set the hint for the size of the texture pool to manage.”
“OSG_BUFFER_OBJECT_POOL_SIZE “,”Set the hint for the size of the vertex buffer object pool to manage.”
“OSG_FBO_POOL_SIZE “,”Set the hint for the size of the frame buffer object pool to manage.”
“OSG_IMPLICIT_BUFFER_ATTACHMENT_RENDER_MASK”,”OFF | DEFAULT | [~]COLOR | [~]DEPTH | [~]STENCIL. Substitute missing buffer attachments for render FBO.”
“OSG_IMPLICIT_BUFFER_ATTACHMENT_RESOLVE_MASK”,”OFF | DEFAULT | [~]COLOR | [~]DEPTH | [~]STENCIL. Substitute missing buffer attachments for resolve FBO.”
“OSG_GL_CONTEXT_VERSION “,”Set the hint for the GL version to create contexts for.”
“OSG_GL_CONTEXT_FLAGS “,”Set the hint for the GL context flags to use when creating contexts.”
“OSG_GL_CONTEXT_PROFILE_MASK “,”Set the hint for the GL context profile mask to use when creating contexts.”
“OSG_SWAP_METHOD “,”DEFAULT | EXCHANGE | COPY | UNDEFINED. Select preferred swap method.”