OpenSceneGraph 3.6.5
|
DisplaySettings class for encapsulating what visuals are required and have been set up, and the status of stereo viewing. More...
#include <DisplaySettings>
Public Member Functions | |
DisplaySettings () | |
DisplaySettings (ArgumentParser &arguments) | |
DisplaySettings (const DisplaySettings &vs) | |
DisplaySettings & | operator= (const DisplaySettings &vs) |
void | setDisplaySettings (const DisplaySettings &vs) |
void | merge (const DisplaySettings &vs) |
void | setDefaults () |
void | readEnvironmentalVariables () |
read the environmental variables. | |
void | readCommandLine (ArgumentParser &arguments) |
read the commandline arguments. | |
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. | |
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. | |
void | setNumOfHttpDatabaseThreadsHint (unsigned int numThreads) |
Set the hint for number of threads in the DatbasePager to dedicate to reading http requests. | |
unsigned int | getNumOfHttpDatabaseThreadsHint () const |
Get the hint for number of threads in the DatbasePager dedicated to reading http requests. | |
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. | |
ImplicitBufferAttachmentMask | getImplicitBufferAttachmentResolveMask () const |
Get mask selecting default implicit buffer attachments for Cameras secondary MULTISAMPLE FBOs. | |
void | setSwapMethod (SwapMethod swapMethod) |
Select preferred swap method. | |
SwapMethod | getSwapMethod (void) |
Get preferred swap method. | |
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. | |
unsigned int | getSyncSwapBuffers () const |
Set whether Arb Sync should be used to manage the swaps buffers. | |
void | setGLContextVersion (const std::string &version) |
Set the hint of which OpenGL version to attempt to create a graphics context for. | |
const std::string | getGLContextVersion () const |
Get the hint of which OpenGL version to attempt to create a graphics context for. | |
void | setGLContextFlags (unsigned int flags) |
Set the hint of the flags to use in when creating graphic contexts. | |
unsigned int | getGLContextFlags () const |
Get the hint of the flags to use in when creating graphic contexts. | |
void | setGLContextProfileMask (unsigned int mask) |
Set the hint of the profile mask to use in when creating graphic contexts. | |
unsigned int | getGLContextProfileMask () const |
Get the hint of the profile mask to use in when creating graphic contexts. | |
void | setNvOptimusEnablement (int value) |
Set the NvOptimusEnablement value. | |
int | getNvOptimusEnablement () const |
Get the NvOptimusEnablement value. | |
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. | |
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. | |
const std::string & | getTextShaderTechnique () const |
void | setKeystoneHint (bool enabled) |
bool | getKeystoneHint () const |
void | setKeystoneFileNames (const FileNames &filenames) |
FileNames & | getKeystoneFileNames () |
const FileNames & | getKeystoneFileNames () const |
void | setKeystones (const Objects &objects) |
Objects & | getKeystones () |
const Objects & | getKeystones () 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. | |
virtual osg::Matrixd | computeLeftEyeViewImplementation (const osg::Matrixd &view, double eyeSeperationScale=1.0) const |
helper function for computing the left eye view matrix. | |
virtual osg::Matrixd | computeRightEyeProjectionImplementation (const osg::Matrixd &projection) const |
helper function for computing the right eye view matrix. | |
virtual osg::Matrixd | computeRightEyeViewImplementation (const osg::Matrixd &view, double eyeSeperationScale=1.0) const |
helper function for computing the right eye view matrix. | |
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 |
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. | |
Referenced (const Referenced &) | |
Referenced & | operator= (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. | |
bool | getThreadSafeRefUnref () const |
Get whether a mutex is used to ensure ref() and unref() are thread safe. | |
OpenThreads::Mutex * | getRefMutex () const |
Get the mutex used to ensure thread safety of ref()/unref(). | |
int | ref () const |
Increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
int | unref () const |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. | |
int | unref_nodelete () const |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. | |
int | referenceCount () const |
Return the number of pointers currently referencing this object. | |
ObserverSet * | getObserverSet () const |
Get the ObserverSet if one is attached, otherwise return NULL. | |
ObserverSet * | getOrCreateObserverSet () const |
Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. | |
void | addObserver (Observer *observer) const |
Add a Observer that is observing this object, notify the Observer when this object gets deleted. | |
void | removeObserver (Observer *observer) const |
Remove Observer that is observing this object. |
Static Public Member Functions | |
static ref_ptr< DisplaySettings > & | instance () |
Maintain a DisplaySettings singleton for objects to query at runtime. | |
Static Public Member Functions inherited from osg::Referenced | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
Get the optional global Referenced mutex, this can be shared between all osg::Referenced. | |
static void | setDeleteHandler (DeleteHandler *handler) |
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated. | |
static DeleteHandler * | getDeleteHandler () |
Get a DeleteHandler. |
Protected Types | |
typedef std::map< std::string, std::string > | ValueMap |
Protected Member Functions | |
virtual | ~DisplaySettings () |
Protected Member Functions inherited from osg::Referenced | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
DisplaySettings class for encapsulating what visuals are required and have been set up, and the status of stereo viewing.
typedef std::vector<std::string> osg::DisplaySettings::FileNames |
typedef std::vector< osg::ref_ptr<osg::Object> > osg::DisplaySettings::Objects |
|
protected |
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 |
|
inline |
References readEnvironmentalVariables(), osg::Referenced::Referenced(), and setDefaults().
Referenced by DisplaySettings(), merge(), operator=(), and setDisplaySettings().
|
inline |
References readCommandLine(), readEnvironmentalVariables(), osg::Referenced::Referenced(), and setDefaults().
osg::DisplaySettings::DisplaySettings | ( | const DisplaySettings & | vs | ) |
References DisplaySettings().
|
protectedvirtual |
|
virtual |
helper function for computing the left eye projection matrix.
|
virtual |
helper function for computing the left eye view matrix.
|
virtual |
helper function for computing the right eye view matrix.
|
virtual |
helper function for computing the right eye view matrix.
|
inline |
|
inline |
References _minimumNumberAlphaBits.
|
inline |
References _application.
|
inline |
References _compileContextsHint.
|
inline |
References _depthBuffer.
|
inline |
References _displayType.
|
inline |
References _doubleBuffer.
|
inline |
References _eyeSeparation.
|
inline |
Get the hint of the flags to use in when creating graphic contexts.
References _glContextFlags.
|
inline |
Get the hint of the profile mask to use in when creating graphic contexts.
References _glContextProfileMask.
|
inline |
Get the hint of which OpenGL version to attempt to create a graphics context for.
References _glContextVersion.
|
inline |
Get mask selecting default implicit buffer attachments for Cameras primary FBOs.
References _implicitBufferAttachmentRenderMask.
Referenced by osg::Camera::getImplicitBufferAttachmentRenderMask().
|
inline |
Get mask selecting default implicit buffer attachments for Cameras secondary MULTISAMPLE FBOs.
References _implicitBufferAttachmentResolveMask.
Referenced by osg::Camera::getImplicitBufferAttachmentResolveMask().
|
inline |
References _keystoneFileNames.
|
inline |
References _keystoneFileNames.
|
inline |
References _keystoneHint.
|
inline |
References _keystones.
|
inline |
References _keystones.
|
inline |
References _maxBufferObjectPoolSize.
unsigned int osg::DisplaySettings::getMaxNumberOfGraphicsContexts | ( | ) | const |
|
inline |
References _maxTexturePoolSize.
|
inline |
References _minimumNumberAccumAlphaBits.
|
inline |
References _minimumNumberAccumBlueBits.
|
inline |
References _minimumNumberAccumGreenBits.
|
inline |
References _minimumNumberAccumRedBits.
|
inline |
References _minimumNumberAlphaBits.
|
inline |
References _minimumNumberStencilBits.
|
inline |
References _numMultiSamples.
|
inline |
References _numMultiSamples.
|
inline |
Get the hint for total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.
References _numDatabaseThreadsHint.
|
inline |
Get the hint for number of threads in the DatbasePager dedicated to reading http requests.
References _numHttpDatabaseThreadsHint.
int osg::DisplaySettings::getNvOptimusEnablement | ( | ) | const |
Get the NvOptimusEnablement value.
|
inline |
References _OSXMenubarBehavior.
|
inline |
References _RGB.
|
inline |
References _screenDistance.
|
inline |
References _screenHeight.
|
inline |
References _screenWidth.
|
inline |
References _serializeDrawDispatch.
|
inline |
References _shaderHint.
|
inline |
References _splitStereoAutoAdjustAspectRatio.
|
inline |
References _splitStereoHorizontalEyeMapping.
|
inline |
References _splitStereoHorizontalSeparation.
|
inline |
References _splitStereoVerticalEyeMapping.
|
inline |
References _splitStereoVerticalSeparation.
|
inline |
References _minimumNumberStencilBits.
|
inline |
References _stereo.
|
inline |
References _stereoMode.
|
inline |
Get preferred swap method.
References _swapMethod.
|
inline |
Set whether Arb Sync should be used to manage the swaps buffers.
References _syncSwapBuffers.
|
inline |
References _textShaderTechnique.
|
inline |
References _useSceneViewForStereoHint.
bool osg::DisplaySettings::getValue | ( | const std::string & | name, |
std::string & | value, | ||
bool | use_getenv_fallback = true ) const |
|
inline |
References _vertexBufferHint.
|
static |
Maintain a DisplaySettings singleton for objects to query at runtime.
Referenced by osg::State::getActiveDisplaySettings(), osg::State::getActiveDisplaySettings(), osg::Camera::getImplicitBufferAttachmentRenderMask(), and osg::Camera::getImplicitBufferAttachmentResolveMask().
void osg::DisplaySettings::merge | ( | const DisplaySettings & | vs | ) |
References DisplaySettings().
DisplaySettings & osg::DisplaySettings::operator= | ( | const DisplaySettings & | vs | ) |
References DisplaySettings().
void osg::DisplaySettings::readCommandLine | ( | ArgumentParser & | arguments | ) |
read the commandline arguments.
Referenced by DisplaySettings().
void osg::DisplaySettings::readEnvironmentalVariables | ( | ) |
read the environmental variables.
Referenced by DisplaySettings(), and DisplaySettings().
|
inline |
References _application.
|
inline |
References _compileContextsHint.
void osg::DisplaySettings::setDefaults | ( | ) |
Referenced by DisplaySettings(), and DisplaySettings().
|
inline |
References _depthBuffer.
void osg::DisplaySettings::setDisplaySettings | ( | const DisplaySettings & | vs | ) |
References DisplaySettings().
|
inline |
References _displayType.
|
inline |
References _doubleBuffer.
|
inline |
References _eyeSeparation.
|
inline |
Set the hint of the flags to use in when creating graphic contexts.
References _glContextFlags.
|
inline |
Set the hint of the profile mask to use in when creating graphic contexts.
References _glContextProfileMask.
|
inline |
Set the hint of which OpenGL version to attempt to create a graphics context for.
References _glContextVersion.
|
inline |
|
inline |
References _implicitBufferAttachmentRenderMask.
|
inline |
References _implicitBufferAttachmentResolveMask.
|
inline |
References _keystoneFileNames.
|
inline |
References _keystoneHint.
|
inline |
References _keystones.
|
inline |
References _maxBufferObjectPoolSize.
void osg::DisplaySettings::setMaxNumberOfGraphicsContexts | ( | unsigned int | num | ) |
|
inline |
References _maxTexturePoolSize.
void osg::DisplaySettings::setMinimumNumAccumBits | ( | unsigned int | red, |
unsigned int | green, | ||
unsigned int | blue, | ||
unsigned int | alpha ) |
|
inline |
References _minimumNumberAlphaBits.
|
inline |
References _minimumNumberStencilBits.
|
inline |
References _numMultiSamples.
|
inline |
Set the hint for the total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.
References _numDatabaseThreadsHint.
|
inline |
Set the hint for number of threads in the DatbasePager to dedicate to reading http requests.
References _numHttpDatabaseThreadsHint.
void osg::DisplaySettings::setNvOptimusEnablement | ( | int | value | ) |
Set the NvOptimusEnablement value.
Default can be set using OSG_NvOptimusEnablement env var.
|
inline |
References _OSXMenubarBehavior.
|
inline |
References _RGB.
|
inline |
References _screenDistance.
|
inline |
References _screenHeight.
|
inline |
References _screenWidth.
|
inline |
References _serializeDrawDispatch.
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.
|
inline |
References _splitStereoAutoAdjustAspectRatio.
|
inline |
References _splitStereoHorizontalEyeMapping.
|
inline |
References _splitStereoHorizontalSeparation.
|
inline |
References _splitStereoVerticalEyeMapping.
|
inline |
References _splitStereoVerticalSeparation.
|
inline |
References _stereo.
|
inline |
References _stereoMode.
|
inline |
Select preferred swap method.
References _swapMethod.
|
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.
References _syncSwapBuffers.
|
inline |
Set the TextShaderTechnique that is used in the Text default constructor to choose which osgText::ShaderTechnique to use.
References _textShaderTechnique.
|
inline |
References _useSceneViewForStereoHint.
void osg::DisplaySettings::setValue | ( | const std::string & | name, |
const std::string & | value ) |
|
inline |
References _vertexBufferHint.
|
protected |
Referenced by getApplication(), and setApplication().
|
protected |
Referenced by getCompileContextsHint(), and setCompileContextsHint().
|
protected |
Referenced by getDepthBuffer(), and setDepthBuffer().
|
protected |
Referenced by getDisplayType(), and setDisplayType().
|
protected |
Referenced by getDoubleBuffer(), and setDoubleBuffer().
|
protected |
Referenced by getEyeSeparation(), and setEyeSeparation().
|
protected |
Referenced by getGLContextFlags(), and setGLContextFlags().
|
protected |
Referenced by getGLContextProfileMask(), and setGLContextProfileMask().
|
protected |
Referenced by getGLContextVersion(), and setGLContextVersion().
|
protected |
|
protected |
|
protected |
Referenced by getKeystoneFileNames(), getKeystoneFileNames(), and setKeystoneFileNames().
|
protected |
Referenced by getKeystoneHint(), and setKeystoneHint().
|
protected |
Referenced by getKeystones(), getKeystones(), and setKeystones().
|
protected |
Referenced by getMaxBufferObjectPoolSize(), and setMaxBufferObjectPoolSize().
|
protected |
|
protected |
Referenced by getMaxTexturePoolSize(), and setMaxTexturePoolSize().
|
protected |
Referenced by getAccumBuffer(), and getMinimumNumAccumAlphaBits().
|
protected |
Referenced by getAccumBuffer(), and getMinimumNumAccumBlueBits().
|
protected |
Referenced by getAccumBuffer(), and getMinimumNumAccumGreenBits().
|
protected |
Referenced by getAccumBuffer(), and getMinimumNumAccumRedBits().
|
protected |
Referenced by getAlphaBuffer(), getMinimumNumAlphaBits(), and setMinimumNumAlphaBits().
|
protected |
Referenced by getMinimumNumStencilBits(), getStencilBuffer(), and setMinimumNumStencilBits().
|
protected |
Referenced by getNumOfDatabaseThreadsHint(), and setNumOfDatabaseThreadsHint().
|
protected |
Referenced by getNumOfHttpDatabaseThreadsHint(), and setNumOfHttpDatabaseThreadsHint().
|
protected |
Referenced by getMultiSamples(), getNumMultiSamples(), and setNumMultiSamples().
|
protected |
Referenced by getOSXMenubarBehavior(), and setOSXMenubarBehavior().
|
protected |
Referenced by getScreenDistance(), and setScreenDistance().
|
protected |
Referenced by getScreenHeight(), and setScreenHeight().
|
protected |
Referenced by getScreenWidth(), and setScreenWidth().
|
protected |
Referenced by getSerializeDrawDispatch(), and setSerializeDrawDispatch().
|
protected |
Referenced by getShaderHint().
|
protected |
Referenced by getSplitStereoAutoAdjustAspectRatio(), and setSplitStereoAutoAdjustAspectRatio().
|
protected |
Referenced by getSplitStereoHorizontalEyeMapping(), and setSplitStereoHorizontalEyeMapping().
|
protected |
Referenced by getSplitStereoHorizontalSeparation(), and setSplitStereoHorizontalSeparation().
|
protected |
Referenced by getSplitStereoVerticalEyeMapping(), and setSplitStereoVerticalEyeMapping().
|
protected |
Referenced by getSplitStereoVerticalSeparation(), and setSplitStereoVerticalSeparation().
|
protected |
Referenced by getStereo(), and setStereo().
|
protected |
Referenced by getStereoMode(), and setStereoMode().
|
protected |
Referenced by getSwapMethod(), and setSwapMethod().
|
protected |
Referenced by getSyncSwapBuffers(), and setSyncSwapBuffers().
|
protected |
Referenced by getTextShaderTechnique(), and setTextShaderTechnique().
|
protected |
Referenced by getUseSceneViewForStereoHint(), and setUseSceneViewForStereoHint().
|
mutableprotected |
|
mutableprotected |
|
protected |
Referenced by getVertexBufferHint(), and setVertexBufferHint().
![]() | Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0. |