Preperation for adding stereo support direclty into osgViewer.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#define OSG_DisplaySettings 1
|
||||
|
||||
#include <osg/Referenced>
|
||||
#include <osg/Matrixd>
|
||||
#include <osg/ref_ptr>
|
||||
|
||||
#include <string>
|
||||
@@ -184,6 +185,11 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
||||
void setSerializeDrawDispatch(bool serializeDrawDispatch) { _serializeDrawDispatch = serializeDrawDispatch; }
|
||||
bool getSerializeDrawDispatch() const { return _serializeDrawDispatch; }
|
||||
|
||||
|
||||
void setUseSceneViewForStereoHint(bool hint) { _useSceneViewForStereoHint = hint; }
|
||||
bool getUseSceneViewForStereoHint() const { return _useSceneViewForStereoHint; }
|
||||
|
||||
|
||||
/** Set the hint for the total number of threads in the DatbasePager set up, inclusive of the number of http dedicated threads.*/
|
||||
void setNumOfDatabaseThreadsHint(unsigned int numThreads) { _numDatabaseThreadsHint = numThreads; }
|
||||
|
||||
@@ -278,6 +284,22 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
||||
/** Get the hint of the profile mask to use in when creating graphic contexts.*/
|
||||
unsigned int getGLContextProfileMask() const { return _glContextProfileMask; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** helper function for computing the left eye projection matrix.*/
|
||||
virtual osg::Matrixd computeLeftEyeProjectionImplementation(const osg::Matrixd& projection) const;
|
||||
|
||||
/** helper function for computing the left eye view matrix.*/
|
||||
virtual osg::Matrixd computeLeftEyeViewImplementation(const osg::Matrixd& view, double eyeSeperationScale=1.0) const;
|
||||
|
||||
/** helper function for computing the right 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;
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~DisplaySettings();
|
||||
@@ -313,6 +335,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
||||
|
||||
bool _compileContextsHint;
|
||||
bool _serializeDrawDispatch;
|
||||
bool _useSceneViewForStereoHint;
|
||||
|
||||
unsigned int _numDatabaseThreadsHint;
|
||||
unsigned int _numHttpDatabaseThreadsHint;
|
||||
|
||||
Reference in New Issue
Block a user