OpenSceneGraph
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osg::DisplaySettings Class Reference

DisplaySettings class for encapsulating what visuals are required and have been set up, and the status of stereo viewing. More...

Inheritance diagram for osg::DisplaySettings:
Inheritance graph
[legend]

Public Types

enum  DisplayType { MONITOR, POWERWALL, REALITY_CENTER, HEAD_MOUNTED_DISPLAY }
 
enum  StereoMode {
  QUAD_BUFFER, ANAGLYPHIC, HORIZONTAL_SPLIT, VERTICAL_SPLIT,
  LEFT_EYE, RIGHT_EYE, HORIZONTAL_INTERLACE, VERTICAL_INTERLACE,
  CHECKERBOARD
}
 
enum  SplitStereoHorizontalEyeMapping { LEFT_EYE_LEFT_VIEWPORT, LEFT_EYE_RIGHT_VIEWPORT }
 
enum  SplitStereoVerticalEyeMapping { LEFT_EYE_TOP_VIEWPORT, LEFT_EYE_BOTTOM_VIEWPORT }
 
enum  ImplicitBufferAttachment { IMPLICIT_DEPTH_BUFFER_ATTACHMENT = (1 << 0), IMPLICIT_STENCIL_BUFFER_ATTACHMENT = (1 << 1), IMPLICIT_COLOR_BUFFER_ATTACHMENT = (1 << 2), DEFAULT_IMPLICIT_BUFFER_ATTACHMENT = IMPLICIT_COLOR_BUFFER_ATTACHMENT | IMPLICIT_DEPTH_BUFFER_ATTACHMENT }
 Methods used to set and get defaults for Cameras implicit buffer attachments. More...
 
enum  SwapMethod { SWAP_DEFAULT, SWAP_EXCHANGE, SWAP_COPY, SWAP_UNDEFINED }
 
enum  VertexBufferHint { NO_PREFERENCE, VERTEX_BUFFER_OBJECT, VERTEX_ARRAY_OBJECT }
 
enum  ShaderHint {
  SHADER_NONE, SHADER_GL2, SHADER_GLES2, SHADER_GL3,
  SHADER_GLES3
}
 
enum  OSXMenubarBehavior { MENUBAR_AUTO_HIDE, MENUBAR_FORCE_HIDE, MENUBAR_FORCE_SHOW }
 
typedef int ImplicitBufferAttachmentMask
 
typedef std::vector< std::string > FileNames
 
typedef std::vector< osg::ref_ptr< osg::Object > > Objects
 
typedef std::vector< std::string > Filenames
 

Public Member Functions

 DisplaySettings ()
 
 DisplaySettings (ArgumentParser &arguments)
 
 DisplaySettings (const DisplaySettings &vs)
 
DisplaySettingsoperator= (const DisplaySettings &vs)
 
void setDisplaySettings (const DisplaySettings &vs)
 
void merge (const DisplaySettings &vs)
 
void setDefaults ()
 
void readEnvironmentalVariables ()
 read the environmental variables. More...
 
void readCommandLine (ArgumentParser &arguments)
 read the commandline arguments. More...
 
void setDisplayType (DisplayType type)
 
DisplayType getDisplayType () const
 
void setStereo (bool on)
 
bool getStereo () const
 
void setStereoMode (StereoMode mode)
 
StereoMode getStereoMode () const
 
void setEyeSeparation (float eyeSeparation)
 
float getEyeSeparation () const
 
void setSplitStereoHorizontalEyeMapping (SplitStereoHorizontalEyeMapping m)
 
SplitStereoHorizontalEyeMapping getSplitStereoHorizontalEyeMapping () const
 
void setSplitStereoHorizontalSeparation (int s)
 
int getSplitStereoHorizontalSeparation () const
 
void setSplitStereoVerticalEyeMapping (SplitStereoVerticalEyeMapping m)
 
SplitStereoVerticalEyeMapping getSplitStereoVerticalEyeMapping () const
 
void setSplitStereoVerticalSeparation (int s)
 
int getSplitStereoVerticalSeparation () const
 
void setSplitStereoAutoAdjustAspectRatio (bool flag)
 
bool getSplitStereoAutoAdjustAspectRatio () const
 
void setScreenWidth (float width)
 
float getScreenWidth () const
 
void setScreenHeight (float height)
 
float getScreenHeight () const
 
void setScreenDistance (float distance)
 
float getScreenDistance () const
 
void setDoubleBuffer (bool flag)
 
bool getDoubleBuffer () const
 
void setRGB (bool flag)
 
bool getRGB () const
 
void setDepthBuffer (bool flag)
 
bool getDepthBuffer () const
 
void setMinimumNumAlphaBits (unsigned int bits)
 
unsigned int getMinimumNumAlphaBits () const
 
bool getAlphaBuffer () const
 
void setMinimumNumStencilBits (unsigned int bits)
 
unsigned int getMinimumNumStencilBits () const
 
bool getStencilBuffer () const
 
void setMinimumNumAccumBits (unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha)
 
unsigned int getMinimumNumAccumRedBits () const
 
unsigned int getMinimumNumAccumGreenBits () const
 
unsigned int getMinimumNumAccumBlueBits () const
 
unsigned int getMinimumNumAccumAlphaBits () const
 
bool getAccumBuffer () const
 
void setMaxNumberOfGraphicsContexts (unsigned int num)
 
unsigned int getMaxNumberOfGraphicsContexts () const
 
void setNumMultiSamples (unsigned int samples)
 
unsigned int getNumMultiSamples () const
 
bool getMultiSamples () const
 
void setCompileContextsHint (bool useCompileContexts)
 
bool getCompileContextsHint () const
 
void setSerializeDrawDispatch (bool serializeDrawDispatch)
 
bool getSerializeDrawDispatch () const
 
void setUseSceneViewForStereoHint (bool hint)
 
bool getUseSceneViewForStereoHint () const
 
void setNumOfDatabaseThreadsHint (unsigned int numThreads)
 Set the hint for the total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads. More...
 
unsigned int getNumOfDatabaseThreadsHint () const
 Get the hint for total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads. More...
 
void setNumOfHttpDatabaseThreadsHint (unsigned int numThreads)
 Set the hint for number of threads in the DatbasePager to dedicate to reading http requests. More...
 
unsigned int getNumOfHttpDatabaseThreadsHint () const
 Get the hint for number of threads in the DatbasePager dedicated to reading http requests. More...
 
void setApplication (const std::string &application)
 
const std::string & getApplication ()
 
void setMaxTexturePoolSize (unsigned int size)
 
unsigned int getMaxTexturePoolSize () const
 
void setMaxBufferObjectPoolSize (unsigned int size)
 
unsigned int getMaxBufferObjectPoolSize () const
 
void setImplicitBufferAttachmentMask (ImplicitBufferAttachmentMask renderMask=DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT, ImplicitBufferAttachmentMask resolveMask=DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT)
 
void setImplicitBufferAttachmentRenderMask (ImplicitBufferAttachmentMask implicitBufferAttachmentRenderMask)
 
void setImplicitBufferAttachmentResolveMask (ImplicitBufferAttachmentMask implicitBufferAttachmentResolveMask)
 
ImplicitBufferAttachmentMask getImplicitBufferAttachmentRenderMask () const
 Get mask selecting default implicit buffer attachments for Cameras primary FBOs. More...
 
ImplicitBufferAttachmentMask getImplicitBufferAttachmentResolveMask () const
 Get mask selecting default implicit buffer attachments for Cameras secondary MULTISAMPLE FBOs. More...
 
void setSwapMethod (SwapMethod swapMethod)
 Select preferred swap method. More...
 
SwapMethod getSwapMethod (void)
 Get preferred swap method. More...
 
void setSyncSwapBuffers (unsigned int numFrames=0)
 Set whether Arb Sync should be used to manage the swaps buffers, 0 disables the use of the sync, greater than zero enables sync based on number of frames specified. More...
 
unsigned int getSyncSwapBuffers () const
 Set whether Arb Sync should be used to manage the swaps buffers. More...
 
void setGLContextVersion (const std::string &version)
 Set the hint of which OpenGL version to attempt to create a graphics context for. More...
 
const std::string getGLContextVersion () const
 Get the hint of which OpenGL version to attempt to create a graphics context for. More...
 
void setGLContextFlags (unsigned int flags)
 Set the hint of the flags to use in when creating graphic contexts. More...
 
unsigned int getGLContextFlags () const
 Get the hint of the flags to use in when creating graphic contexts. More...
 
void setGLContextProfileMask (unsigned int mask)
 Set the hint of the profile mask to use in when creating graphic contexts. More...
 
unsigned int getGLContextProfileMask () const
 Get the hint of the profile mask to use in when creating graphic contexts. More...
 
void setNvOptimusEnablement (int value)
 Set the NvOptimusEnablement value. More...
 
int getNvOptimusEnablement () const
 Get the NvOptimusEnablement value. More...
 
void setVertexBufferHint (VertexBufferHint gi)
 
VertexBufferHint getVertexBufferHint () const
 
void setShaderHint (ShaderHint hint, bool setShaderValues=true)
 set the ShaderHint to tells shader generating cdoes version to create. More...
 
ShaderHint getShaderHint () const
 
void setTextShaderTechnique (const std::string &str)
 Set the TextShaderTechnique that is used in the Text default constructor to choose which osgText::ShaderTechnique to use. More...
 
const std::string & getTextShaderTechnique () const
 
void setKeystoneHint (bool enabled)
 
bool getKeystoneHint () const
 
void setKeystoneFileNames (const FileNames &filenames)
 
FileNamesgetKeystoneFileNames ()
 
const FileNamesgetKeystoneFileNames () const
 
void setKeystones (const Objects &objects)
 
ObjectsgetKeystones ()
 
const ObjectsgetKeystones () const
 
OSXMenubarBehavior getOSXMenubarBehavior () const
 
void setOSXMenubarBehavior (OSXMenubarBehavior hint)
 
virtual osg::Matrixd computeLeftEyeProjectionImplementation (const osg::Matrixd &projection) const
 helper function for computing the left eye projection matrix. More...
 
virtual osg::Matrixd computeLeftEyeViewImplementation (const osg::Matrixd &view, double eyeSeperationScale=1.0) const
 helper function for computing the left eye view matrix. More...
 
virtual osg::Matrixd computeRightEyeProjectionImplementation (const osg::Matrixd &projection) const
 helper function for computing the right eye view matrix. More...
 
virtual osg::Matrixd computeRightEyeViewImplementation (const osg::Matrixd &view, double eyeSeperationScale=1.0) const
 helper function for computing the right eye view matrix. More...
 
void setShaderPipeline (bool flag)
 
bool getShaderPipeline () const
 
void setShaderPipelineFiles (const Filenames &filename)
 
const FilenamesgetShaderPipelineFiles () const
 
void setShaderPipelineNumTextureUnits (unsigned int units)
 
unsigned int getShaderPipelineNumTextureUnits () const
 
void setValue (const std::string &name, const std::string &value)
 
bool getValue (const std::string &name, std::string &value, bool use_getenv_fallback=true) const
 
void setObject (const std::string &name, osg::Object *object)
 
ObjectgetObject (const std::string &name)
 
const ObjectgetObject (const std::string &name) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 Deprecated, Referenced is now always uses thread safe ref/unref, use default Referenced() constructor instead. More...
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
virtual void setThreadSafeRefUnref (bool)
 Deprecated, Referenced is always theadsafe so there method now has no effect and does not need to be called. More...
 
bool getThreadSafeRefUnref () const
 Get whether a mutex is used to ensure ref() and unref() are thread safe. More...
 
OpenThreads::MutexgetRefMutex () const
 Get the mutex used to ensure thread safety of ref()/unref(). More...
 
int ref () const
 Increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
int unref () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
int unref_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
int referenceCount () const
 Return the number of pointers currently referencing this object. More...
 
ObserverSetgetObserverSet () const
 Get the ObserverSet if one is attached, otherwise return NULL. More...
 
ObserverSetgetOrCreateObserverSet () const
 Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. More...
 
void addObserver (Observer *observer) const
 Add a Observer that is observing this object, notify the Observer when this object gets deleted. More...
 
void removeObserver (Observer *observer) const
 Remove Observer that is observing this object. More...
 

Static Public Member Functions

static ref_ptr< DisplaySettings > & instance ()
 Maintain a DisplaySettings singleton for objects to query at runtime. More...
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 Get the optional global Referenced mutex, this can be shared between all osg::Referenced. More...
 
static void setDeleteHandler (DeleteHandler *handler)
 Set a DeleteHandler to which deletion of all referenced counted objects will be delegated. More...
 
static DeleteHandlergetDeleteHandler ()
 Get a DeleteHandler. More...
 

Protected Types

typedef std::map< std::string, std::string > ValueMap
 
typedef std::map< std::string, ref_ptr< Object > > ObjectMap
 

Protected Member Functions

virtual ~DisplaySettings ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

DisplayType _displayType
 
bool _stereo
 
StereoMode _stereoMode
 
float _eyeSeparation
 
float _screenWidth
 
float _screenHeight
 
float _screenDistance
 
SplitStereoHorizontalEyeMapping _splitStereoHorizontalEyeMapping
 
int _splitStereoHorizontalSeparation
 
SplitStereoVerticalEyeMapping _splitStereoVerticalEyeMapping
 
int _splitStereoVerticalSeparation
 
bool _splitStereoAutoAdjustAspectRatio
 
bool _doubleBuffer
 
bool _RGB
 
bool _depthBuffer
 
unsigned int _minimumNumberAlphaBits
 
unsigned int _minimumNumberStencilBits
 
unsigned int _minimumNumberAccumRedBits
 
unsigned int _minimumNumberAccumGreenBits
 
unsigned int _minimumNumberAccumBlueBits
 
unsigned int _minimumNumberAccumAlphaBits
 
unsigned int _maxNumOfGraphicsContexts
 
unsigned int _numMultiSamples
 
bool _compileContextsHint
 
bool _serializeDrawDispatch
 
bool _useSceneViewForStereoHint
 
unsigned int _numDatabaseThreadsHint
 
unsigned int _numHttpDatabaseThreadsHint
 
std::string _application
 
unsigned int _maxTexturePoolSize
 
unsigned int _maxBufferObjectPoolSize
 
ImplicitBufferAttachmentMask _implicitBufferAttachmentRenderMask
 
ImplicitBufferAttachmentMask _implicitBufferAttachmentResolveMask
 
std::string _glContextVersion
 
unsigned int _glContextFlags
 
unsigned int _glContextProfileMask
 
SwapMethod _swapMethod
 
unsigned int _syncSwapBuffers
 
VertexBufferHint _vertexBufferHint
 
ShaderHint _shaderHint
 
std::string _textShaderTechnique
 
bool _keystoneHint
 
FileNames _keystoneFileNames
 
Objects _keystones
 
OSXMenubarBehavior _OSXMenubarBehavior
 
bool _shaderPipeline
 
Filenames _shaderPipelineFiles
 
unsigned int _shaderPipelineNumTextureUnits
 
OpenThreads::Mutex _valueMapMutex
 
ValueMap _valueMap
 
ObjectMap _objectMap
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Detailed Description

DisplaySettings class for encapsulating what visuals are required and have been set up, and the status of stereo viewing.

Member Typedef Documentation

◆ FileNames

typedef std::vector<std::string> osg::DisplaySettings::FileNames

◆ Filenames

typedef std::vector< std::string > osg::DisplaySettings::Filenames

◆ ImplicitBufferAttachmentMask

◆ ObjectMap

typedef std::map<std::string, ref_ptr<Object> > osg::DisplaySettings::ObjectMap
protected

◆ Objects

◆ ValueMap

typedef std::map<std::string, std::string> osg::DisplaySettings::ValueMap
protected

Member Enumeration Documentation

◆ DisplayType

Enumerator
MONITOR 
POWERWALL 
REALITY_CENTER 
HEAD_MOUNTED_DISPLAY 

◆ ImplicitBufferAttachment

Methods used to set and get defaults for Cameras implicit buffer attachments.

For more info: See description of Camera::setImplicitBufferAttachment method

DisplaySettings implicit buffer attachment selection defaults to: DEPTH and COLOR for both primary (Render) FBO and secondary Multisample (Resolve) FBO ie: IMPLICIT_DEPTH_BUFFER_ATTACHMENT | IMPLICIT_COLOR_BUFFER_ATTACHMENT

Enumerator
IMPLICIT_DEPTH_BUFFER_ATTACHMENT 
IMPLICIT_STENCIL_BUFFER_ATTACHMENT 
IMPLICIT_COLOR_BUFFER_ATTACHMENT 
DEFAULT_IMPLICIT_BUFFER_ATTACHMENT 

◆ OSXMenubarBehavior

Enumerator
MENUBAR_AUTO_HIDE 
MENUBAR_FORCE_HIDE 
MENUBAR_FORCE_SHOW 

◆ ShaderHint

Enumerator
SHADER_NONE 
SHADER_GL2 
SHADER_GLES2 
SHADER_GL3 
SHADER_GLES3 

◆ SplitStereoHorizontalEyeMapping

Enumerator
LEFT_EYE_LEFT_VIEWPORT 
LEFT_EYE_RIGHT_VIEWPORT 

◆ SplitStereoVerticalEyeMapping

Enumerator
LEFT_EYE_TOP_VIEWPORT 
LEFT_EYE_BOTTOM_VIEWPORT 

◆ StereoMode

Enumerator
QUAD_BUFFER 
ANAGLYPHIC 
HORIZONTAL_SPLIT 
VERTICAL_SPLIT 
LEFT_EYE 
RIGHT_EYE 
HORIZONTAL_INTERLACE 
VERTICAL_INTERLACE 
CHECKERBOARD 

◆ SwapMethod

Enumerator
SWAP_DEFAULT 
SWAP_EXCHANGE 
SWAP_COPY 
SWAP_UNDEFINED 

◆ VertexBufferHint

Enumerator
NO_PREFERENCE 
VERTEX_BUFFER_OBJECT 
VERTEX_ARRAY_OBJECT 

Constructor & Destructor Documentation

◆ DisplaySettings() [1/3]

osg::DisplaySettings::DisplaySettings ( )
inline

◆ DisplaySettings() [2/3]

osg::DisplaySettings::DisplaySettings ( ArgumentParser arguments)
inline

◆ DisplaySettings() [3/3]

osg::DisplaySettings::DisplaySettings ( const DisplaySettings vs)

◆ ~DisplaySettings()

virtual osg::DisplaySettings::~DisplaySettings ( )
protectedvirtual

Member Function Documentation

◆ computeLeftEyeProjectionImplementation()

virtual osg::Matrixd osg::DisplaySettings::computeLeftEyeProjectionImplementation ( const osg::Matrixd projection) const
virtual

helper function for computing the left eye projection matrix.

◆ computeLeftEyeViewImplementation()

virtual osg::Matrixd osg::DisplaySettings::computeLeftEyeViewImplementation ( const osg::Matrixd view,
double  eyeSeperationScale = 1.0 
) const
virtual

helper function for computing the left eye view matrix.

◆ computeRightEyeProjectionImplementation()

virtual osg::Matrixd osg::DisplaySettings::computeRightEyeProjectionImplementation ( const osg::Matrixd projection) const
virtual

helper function for computing the right eye view matrix.

◆ computeRightEyeViewImplementation()

virtual osg::Matrixd osg::DisplaySettings::computeRightEyeViewImplementation ( const osg::Matrixd view,
double  eyeSeperationScale = 1.0 
) const
virtual

helper function for computing the right eye view matrix.

◆ getAccumBuffer()

bool osg::DisplaySettings::getAccumBuffer ( ) const
inline

◆ getAlphaBuffer()

bool osg::DisplaySettings::getAlphaBuffer ( ) const
inline

◆ getApplication()

const std::string& osg::DisplaySettings::getApplication ( )
inline

◆ getCompileContextsHint()

bool osg::DisplaySettings::getCompileContextsHint ( ) const
inline

◆ getDepthBuffer()

bool osg::DisplaySettings::getDepthBuffer ( ) const
inline

◆ getDisplayType()

DisplayType osg::DisplaySettings::getDisplayType ( ) const
inline

◆ getDoubleBuffer()

bool osg::DisplaySettings::getDoubleBuffer ( ) const
inline

◆ getEyeSeparation()

float osg::DisplaySettings::getEyeSeparation ( ) const
inline

◆ getGLContextFlags()

unsigned int osg::DisplaySettings::getGLContextFlags ( ) const
inline

Get the hint of the flags to use in when creating graphic contexts.

◆ getGLContextProfileMask()

unsigned int osg::DisplaySettings::getGLContextProfileMask ( ) const
inline

Get the hint of the profile mask to use in when creating graphic contexts.

◆ getGLContextVersion()

const std::string osg::DisplaySettings::getGLContextVersion ( ) const
inline

Get the hint of which OpenGL version to attempt to create a graphics context for.

◆ getImplicitBufferAttachmentRenderMask()

ImplicitBufferAttachmentMask osg::DisplaySettings::getImplicitBufferAttachmentRenderMask ( ) const
inline

Get mask selecting default implicit buffer attachments for Cameras primary FBOs.

Referenced by osg::Camera::getImplicitBufferAttachmentRenderMask().

◆ getImplicitBufferAttachmentResolveMask()

ImplicitBufferAttachmentMask osg::DisplaySettings::getImplicitBufferAttachmentResolveMask ( ) const
inline

Get mask selecting default implicit buffer attachments for Cameras secondary MULTISAMPLE FBOs.

Referenced by osg::Camera::getImplicitBufferAttachmentResolveMask().

◆ getKeystoneFileNames() [1/2]

FileNames& osg::DisplaySettings::getKeystoneFileNames ( )
inline

◆ getKeystoneFileNames() [2/2]

const FileNames& osg::DisplaySettings::getKeystoneFileNames ( ) const
inline

◆ getKeystoneHint()

bool osg::DisplaySettings::getKeystoneHint ( ) const
inline

◆ getKeystones() [1/2]

Objects& osg::DisplaySettings::getKeystones ( )
inline

◆ getKeystones() [2/2]

const Objects& osg::DisplaySettings::getKeystones ( ) const
inline

◆ getMaxBufferObjectPoolSize()

unsigned int osg::DisplaySettings::getMaxBufferObjectPoolSize ( ) const
inline

◆ getMaxNumberOfGraphicsContexts()

unsigned int osg::DisplaySettings::getMaxNumberOfGraphicsContexts ( ) const

◆ getMaxTexturePoolSize()

unsigned int osg::DisplaySettings::getMaxTexturePoolSize ( ) const
inline

◆ getMinimumNumAccumAlphaBits()

unsigned int osg::DisplaySettings::getMinimumNumAccumAlphaBits ( ) const
inline

◆ getMinimumNumAccumBlueBits()

unsigned int osg::DisplaySettings::getMinimumNumAccumBlueBits ( ) const
inline

◆ getMinimumNumAccumGreenBits()

unsigned int osg::DisplaySettings::getMinimumNumAccumGreenBits ( ) const
inline

◆ getMinimumNumAccumRedBits()

unsigned int osg::DisplaySettings::getMinimumNumAccumRedBits ( ) const
inline

◆ getMinimumNumAlphaBits()

unsigned int osg::DisplaySettings::getMinimumNumAlphaBits ( ) const
inline

◆ getMinimumNumStencilBits()

unsigned int osg::DisplaySettings::getMinimumNumStencilBits ( ) const
inline

◆ getMultiSamples()

bool osg::DisplaySettings::getMultiSamples ( ) const
inline

◆ getNumMultiSamples()

unsigned int osg::DisplaySettings::getNumMultiSamples ( ) const
inline

◆ getNumOfDatabaseThreadsHint()

unsigned int osg::DisplaySettings::getNumOfDatabaseThreadsHint ( ) const
inline

Get the hint for total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.

◆ getNumOfHttpDatabaseThreadsHint()

unsigned int osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint ( ) const
inline

Get the hint for number of threads in the DatbasePager dedicated to reading http requests.

◆ getNvOptimusEnablement()

int osg::DisplaySettings::getNvOptimusEnablement ( ) const

Get the NvOptimusEnablement value.

◆ getObject() [1/2]

Object* osg::DisplaySettings::getObject ( const std::string &  name)
inline

◆ getObject() [2/2]

const Object* osg::DisplaySettings::getObject ( const std::string &  name) const
inline

◆ getOSXMenubarBehavior()

OSXMenubarBehavior osg::DisplaySettings::getOSXMenubarBehavior ( ) const
inline

◆ getRGB()

bool osg::DisplaySettings::getRGB ( ) const
inline

◆ getScreenDistance()

float osg::DisplaySettings::getScreenDistance ( ) const
inline

◆ getScreenHeight()

float osg::DisplaySettings::getScreenHeight ( ) const
inline

◆ getScreenWidth()

float osg::DisplaySettings::getScreenWidth ( ) const
inline

◆ getSerializeDrawDispatch()

bool osg::DisplaySettings::getSerializeDrawDispatch ( ) const
inline

◆ getShaderHint()

ShaderHint osg::DisplaySettings::getShaderHint ( ) const
inline

◆ getShaderPipeline()

bool osg::DisplaySettings::getShaderPipeline ( ) const
inline

◆ getShaderPipelineFiles()

const Filenames& osg::DisplaySettings::getShaderPipelineFiles ( ) const
inline

◆ getShaderPipelineNumTextureUnits()

unsigned int osg::DisplaySettings::getShaderPipelineNumTextureUnits ( ) const
inline

◆ getSplitStereoAutoAdjustAspectRatio()

bool osg::DisplaySettings::getSplitStereoAutoAdjustAspectRatio ( ) const
inline

◆ getSplitStereoHorizontalEyeMapping()

SplitStereoHorizontalEyeMapping osg::DisplaySettings::getSplitStereoHorizontalEyeMapping ( ) const
inline

◆ getSplitStereoHorizontalSeparation()

int osg::DisplaySettings::getSplitStereoHorizontalSeparation ( ) const
inline

◆ getSplitStereoVerticalEyeMapping()

SplitStereoVerticalEyeMapping osg::DisplaySettings::getSplitStereoVerticalEyeMapping ( ) const
inline

◆ getSplitStereoVerticalSeparation()

int osg::DisplaySettings::getSplitStereoVerticalSeparation ( ) const
inline

◆ getStencilBuffer()

bool osg::DisplaySettings::getStencilBuffer ( ) const
inline

◆ getStereo()

bool osg::DisplaySettings::getStereo ( ) const
inline

◆ getStereoMode()

StereoMode osg::DisplaySettings::getStereoMode ( ) const
inline

◆ getSwapMethod()

SwapMethod osg::DisplaySettings::getSwapMethod ( void  )
inline

Get preferred swap method.

◆ getSyncSwapBuffers()

unsigned int osg::DisplaySettings::getSyncSwapBuffers ( ) const
inline

Set whether Arb Sync should be used to manage the swaps buffers.

◆ getTextShaderTechnique()

const std::string& osg::DisplaySettings::getTextShaderTechnique ( ) const
inline

◆ getUseSceneViewForStereoHint()

bool osg::DisplaySettings::getUseSceneViewForStereoHint ( ) const
inline

◆ getValue()

bool osg::DisplaySettings::getValue ( const std::string &  name,
std::string &  value,
bool  use_getenv_fallback = true 
) const

◆ getVertexBufferHint()

VertexBufferHint osg::DisplaySettings::getVertexBufferHint ( ) const
inline

◆ instance()

static ref_ptr<DisplaySettings>& osg::DisplaySettings::instance ( )
static

◆ merge()

void osg::DisplaySettings::merge ( const DisplaySettings vs)

◆ operator=()

DisplaySettings& osg::DisplaySettings::operator= ( const DisplaySettings vs)

◆ readCommandLine()

void osg::DisplaySettings::readCommandLine ( ArgumentParser arguments)

read the commandline arguments.

◆ readEnvironmentalVariables()

void osg::DisplaySettings::readEnvironmentalVariables ( )

read the environmental variables.

◆ setApplication()

void osg::DisplaySettings::setApplication ( const std::string &  application)
inline

◆ setCompileContextsHint()

void osg::DisplaySettings::setCompileContextsHint ( bool  useCompileContexts)
inline

◆ setDefaults()

void osg::DisplaySettings::setDefaults ( )

◆ setDepthBuffer()

void osg::DisplaySettings::setDepthBuffer ( bool  flag)
inline

◆ setDisplaySettings()

void osg::DisplaySettings::setDisplaySettings ( const DisplaySettings vs)

◆ setDisplayType()

void osg::DisplaySettings::setDisplayType ( DisplayType  type)
inline

◆ setDoubleBuffer()

void osg::DisplaySettings::setDoubleBuffer ( bool  flag)
inline

◆ setEyeSeparation()

void osg::DisplaySettings::setEyeSeparation ( float  eyeSeparation)
inline

◆ setGLContextFlags()

void osg::DisplaySettings::setGLContextFlags ( unsigned int  flags)
inline

Set the hint of the flags to use in when creating graphic contexts.

◆ setGLContextProfileMask()

void osg::DisplaySettings::setGLContextProfileMask ( unsigned int  mask)
inline

Set the hint of the profile mask to use in when creating graphic contexts.

◆ setGLContextVersion()

void osg::DisplaySettings::setGLContextVersion ( const std::string &  version)
inline

Set the hint of which OpenGL version to attempt to create a graphics context for.

◆ setImplicitBufferAttachmentMask()

void osg::DisplaySettings::setImplicitBufferAttachmentMask ( ImplicitBufferAttachmentMask  renderMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT,
ImplicitBufferAttachmentMask  resolveMask = DisplaySettings::DEFAULT_IMPLICIT_BUFFER_ATTACHMENT 
)
inline

◆ setImplicitBufferAttachmentRenderMask()

void osg::DisplaySettings::setImplicitBufferAttachmentRenderMask ( ImplicitBufferAttachmentMask  implicitBufferAttachmentRenderMask)
inline

◆ setImplicitBufferAttachmentResolveMask()

void osg::DisplaySettings::setImplicitBufferAttachmentResolveMask ( ImplicitBufferAttachmentMask  implicitBufferAttachmentResolveMask)
inline

◆ setKeystoneFileNames()

void osg::DisplaySettings::setKeystoneFileNames ( const FileNames filenames)
inline

◆ setKeystoneHint()

void osg::DisplaySettings::setKeystoneHint ( bool  enabled)
inline

◆ setKeystones()

void osg::DisplaySettings::setKeystones ( const Objects objects)
inline

◆ setMaxBufferObjectPoolSize()

void osg::DisplaySettings::setMaxBufferObjectPoolSize ( unsigned int  size)
inline

◆ setMaxNumberOfGraphicsContexts()

void osg::DisplaySettings::setMaxNumberOfGraphicsContexts ( unsigned int  num)

◆ setMaxTexturePoolSize()

void osg::DisplaySettings::setMaxTexturePoolSize ( unsigned int  size)
inline

◆ setMinimumNumAccumBits()

void osg::DisplaySettings::setMinimumNumAccumBits ( unsigned int  red,
unsigned int  green,
unsigned int  blue,
unsigned int  alpha 
)

◆ setMinimumNumAlphaBits()

void osg::DisplaySettings::setMinimumNumAlphaBits ( unsigned int  bits)
inline

◆ setMinimumNumStencilBits()

void osg::DisplaySettings::setMinimumNumStencilBits ( unsigned int  bits)
inline

◆ setNumMultiSamples()

void osg::DisplaySettings::setNumMultiSamples ( unsigned int  samples)
inline

◆ setNumOfDatabaseThreadsHint()

void osg::DisplaySettings::setNumOfDatabaseThreadsHint ( unsigned int  numThreads)
inline

Set the hint for the total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.

◆ setNumOfHttpDatabaseThreadsHint()

void osg::DisplaySettings::setNumOfHttpDatabaseThreadsHint ( unsigned int  numThreads)
inline

Set the hint for number of threads in the DatbasePager to dedicate to reading http requests.

◆ setNvOptimusEnablement()

void osg::DisplaySettings::setNvOptimusEnablement ( int  value)

Set the NvOptimusEnablement value.

Default can be set using OSG_NvOptimusEnablement env var.

◆ setObject()

void osg::DisplaySettings::setObject ( const std::string &  name,
osg::Object object 
)
inline

◆ setOSXMenubarBehavior()

void osg::DisplaySettings::setOSXMenubarBehavior ( OSXMenubarBehavior  hint)
inline

◆ setRGB()

void osg::DisplaySettings::setRGB ( bool  flag)
inline

◆ setScreenDistance()

void osg::DisplaySettings::setScreenDistance ( float  distance)
inline

◆ setScreenHeight()

void osg::DisplaySettings::setScreenHeight ( float  height)
inline

◆ setScreenWidth()

void osg::DisplaySettings::setScreenWidth ( float  width)
inline

◆ setSerializeDrawDispatch()

void osg::DisplaySettings::setSerializeDrawDispatch ( bool  serializeDrawDispatch)
inline

◆ setShaderHint()

void osg::DisplaySettings::setShaderHint ( ShaderHint  hint,
bool  setShaderValues = true 
)

set the ShaderHint to tells shader generating cdoes version to create.

By default also OSG_GLSL_VERSION and OSG_PRECISION_FLOAT values that can get use directly in shaders using $OSG_GLSL_VERSION and $OSG_PRECISION_FLOAT respectively.

◆ setShaderPipeline()

void osg::DisplaySettings::setShaderPipeline ( bool  flag)
inline

◆ setShaderPipelineFiles()

void osg::DisplaySettings::setShaderPipelineFiles ( const Filenames filename)
inline

◆ setShaderPipelineNumTextureUnits()

void osg::DisplaySettings::setShaderPipelineNumTextureUnits ( unsigned int  units)
inline

◆ setSplitStereoAutoAdjustAspectRatio()

void osg::DisplaySettings::setSplitStereoAutoAdjustAspectRatio ( bool  flag)
inline

◆ setSplitStereoHorizontalEyeMapping()

void osg::DisplaySettings::setSplitStereoHorizontalEyeMapping ( SplitStereoHorizontalEyeMapping  m)
inline

◆ setSplitStereoHorizontalSeparation()

void osg::DisplaySettings::setSplitStereoHorizontalSeparation ( int  s)
inline

◆ setSplitStereoVerticalEyeMapping()

void osg::DisplaySettings::setSplitStereoVerticalEyeMapping ( SplitStereoVerticalEyeMapping  m)
inline

◆ setSplitStereoVerticalSeparation()

void osg::DisplaySettings::setSplitStereoVerticalSeparation ( int  s)
inline

◆ setStereo()

void osg::DisplaySettings::setStereo ( bool  on)
inline

◆ setStereoMode()

void osg::DisplaySettings::setStereoMode ( StereoMode  mode)
inline

◆ setSwapMethod()

void osg::DisplaySettings::setSwapMethod ( SwapMethod  swapMethod)
inline

Select preferred swap method.

◆ setSyncSwapBuffers()

void osg::DisplaySettings::setSyncSwapBuffers ( unsigned int  numFrames = 0)
inline

Set whether Arb Sync should be used to manage the swaps buffers, 0 disables the use of the sync, greater than zero enables sync based on number of frames specified.

◆ setTextShaderTechnique()

void osg::DisplaySettings::setTextShaderTechnique ( const std::string &  str)
inline

Set the TextShaderTechnique that is used in the Text default constructor to choose which osgText::ShaderTechnique to use.

◆ setUseSceneViewForStereoHint()

void osg::DisplaySettings::setUseSceneViewForStereoHint ( bool  hint)
inline

◆ setValue()

void osg::DisplaySettings::setValue ( const std::string &  name,
const std::string &  value 
)

◆ setVertexBufferHint()

void osg::DisplaySettings::setVertexBufferHint ( VertexBufferHint  gi)
inline

Member Data Documentation

◆ _application

std::string osg::DisplaySettings::_application
protected

◆ _compileContextsHint

bool osg::DisplaySettings::_compileContextsHint
protected

◆ _depthBuffer

bool osg::DisplaySettings::_depthBuffer
protected

◆ _displayType

DisplayType osg::DisplaySettings::_displayType
protected

◆ _doubleBuffer

bool osg::DisplaySettings::_doubleBuffer
protected

◆ _eyeSeparation

float osg::DisplaySettings::_eyeSeparation
protected

◆ _glContextFlags

unsigned int osg::DisplaySettings::_glContextFlags
protected

◆ _glContextProfileMask

unsigned int osg::DisplaySettings::_glContextProfileMask
protected

◆ _glContextVersion

std::string osg::DisplaySettings::_glContextVersion
protected

◆ _implicitBufferAttachmentRenderMask

ImplicitBufferAttachmentMask osg::DisplaySettings::_implicitBufferAttachmentRenderMask
protected

◆ _implicitBufferAttachmentResolveMask

ImplicitBufferAttachmentMask osg::DisplaySettings::_implicitBufferAttachmentResolveMask
protected

◆ _keystoneFileNames

FileNames osg::DisplaySettings::_keystoneFileNames
protected

◆ _keystoneHint

bool osg::DisplaySettings::_keystoneHint
protected

◆ _keystones

Objects osg::DisplaySettings::_keystones
protected

◆ _maxBufferObjectPoolSize

unsigned int osg::DisplaySettings::_maxBufferObjectPoolSize
protected

◆ _maxNumOfGraphicsContexts

unsigned int osg::DisplaySettings::_maxNumOfGraphicsContexts
protected

◆ _maxTexturePoolSize

unsigned int osg::DisplaySettings::_maxTexturePoolSize
protected

◆ _minimumNumberAccumAlphaBits

unsigned int osg::DisplaySettings::_minimumNumberAccumAlphaBits
protected

◆ _minimumNumberAccumBlueBits

unsigned int osg::DisplaySettings::_minimumNumberAccumBlueBits
protected

◆ _minimumNumberAccumGreenBits

unsigned int osg::DisplaySettings::_minimumNumberAccumGreenBits
protected

◆ _minimumNumberAccumRedBits

unsigned int osg::DisplaySettings::_minimumNumberAccumRedBits
protected

◆ _minimumNumberAlphaBits

unsigned int osg::DisplaySettings::_minimumNumberAlphaBits
protected

◆ _minimumNumberStencilBits

unsigned int osg::DisplaySettings::_minimumNumberStencilBits
protected

◆ _numDatabaseThreadsHint

unsigned int osg::DisplaySettings::_numDatabaseThreadsHint
protected

◆ _numHttpDatabaseThreadsHint

unsigned int osg::DisplaySettings::_numHttpDatabaseThreadsHint
protected

◆ _numMultiSamples

unsigned int osg::DisplaySettings::_numMultiSamples
protected

◆ _objectMap

ObjectMap osg::DisplaySettings::_objectMap
mutableprotected

◆ _OSXMenubarBehavior

OSXMenubarBehavior osg::DisplaySettings::_OSXMenubarBehavior
protected

◆ _RGB

bool osg::DisplaySettings::_RGB
protected

◆ _screenDistance

float osg::DisplaySettings::_screenDistance
protected

◆ _screenHeight

float osg::DisplaySettings::_screenHeight
protected

◆ _screenWidth

float osg::DisplaySettings::_screenWidth
protected

◆ _serializeDrawDispatch

bool osg::DisplaySettings::_serializeDrawDispatch
protected

◆ _shaderHint

ShaderHint osg::DisplaySettings::_shaderHint
protected

◆ _shaderPipeline

bool osg::DisplaySettings::_shaderPipeline
protected

◆ _shaderPipelineFiles

Filenames osg::DisplaySettings::_shaderPipelineFiles
protected

◆ _shaderPipelineNumTextureUnits

unsigned int osg::DisplaySettings::_shaderPipelineNumTextureUnits
protected

◆ _splitStereoAutoAdjustAspectRatio

bool osg::DisplaySettings::_splitStereoAutoAdjustAspectRatio
protected

◆ _splitStereoHorizontalEyeMapping

SplitStereoHorizontalEyeMapping osg::DisplaySettings::_splitStereoHorizontalEyeMapping
protected

◆ _splitStereoHorizontalSeparation

int osg::DisplaySettings::_splitStereoHorizontalSeparation
protected

◆ _splitStereoVerticalEyeMapping

SplitStereoVerticalEyeMapping osg::DisplaySettings::_splitStereoVerticalEyeMapping
protected

◆ _splitStereoVerticalSeparation

int osg::DisplaySettings::_splitStereoVerticalSeparation
protected

◆ _stereo

bool osg::DisplaySettings::_stereo
protected

◆ _stereoMode

StereoMode osg::DisplaySettings::_stereoMode
protected

◆ _swapMethod

SwapMethod osg::DisplaySettings::_swapMethod
protected

◆ _syncSwapBuffers

unsigned int osg::DisplaySettings::_syncSwapBuffers
protected

◆ _textShaderTechnique

std::string osg::DisplaySettings::_textShaderTechnique
protected

◆ _useSceneViewForStereoHint

bool osg::DisplaySettings::_useSceneViewForStereoHint
protected

◆ _valueMap

ValueMap osg::DisplaySettings::_valueMap
mutableprotected

◆ _valueMapMutex

OpenThreads::Mutex osg::DisplaySettings::_valueMapMutex
mutableprotected

◆ _vertexBufferHint

VertexBufferHint osg::DisplaySettings::_vertexBufferHint
protected

The documentation for this class was generated from the following file: