From Farshid Lashkari & Robert Osfield: Added support for VERTICAL_INTERLACE and HORIZONTAL_INTERLACE

stereo modes use the stencil buffer.
This commit is contained in:
Robert Osfield
2005-10-25 15:43:04 +00:00
parent e14262df85
commit f46044084a
5 changed files with 242 additions and 14 deletions

View File

@@ -90,7 +90,9 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
HORIZONTAL_SPLIT,
VERTICAL_SPLIT,
LEFT_EYE,
RIGHT_EYE
RIGHT_EYE,
HORIZONTAL_INTERLACE,
VERTICAL_INTERLACE
};
void setStereoMode(StereoMode mode) { _stereoMode = mode; }

View File

@@ -113,6 +113,13 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced, public osg::CullSetting
void setClearColor(const osg::Vec4& color) { _clearColor=color; }
/** Get the color used in glClearColor.*/
const osg::Vec4& getClearColor() const { return _clearColor; }
/** Mannually set the redraw interlaced stereo stencil mask request flag to control whether to redraw the stencil buffer on the next frame.*/
void setRedrawInterlacedStereoStencilMask(bool flag) { _redrawInterlacedStereoStencilMask = flag; }
/** Get the redraw interlaced stereo stencil mask request flag.*/
bool getRedrawInterlacedStereoStencilMask() const { return _redrawInterlacedStereoStencilMask; }
void setGlobalStateSet(osg::StateSet* state) { _globalStateSet = state; }
@@ -504,6 +511,11 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced, public osg::CullSetting
int _activeUniforms;
double _previousFrameTime;
bool _redrawInterlacedStereoStencilMask;
int _interlacedStereoStencilWidth;
int _interlacedStereoStencilHeight;
};
}