Added SceneView::s/getDrawBufferValue(GLenum) to allow customization of what

glDrawBuffer() value is set on each frame.
This commit is contained in:
Robert Osfield
2003-10-17 10:25:59 +00:00
parent 8b0a5035b2
commit 594f25b5d1
2 changed files with 43 additions and 6 deletions

View File

@@ -190,6 +190,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
/** Set to the position and orientation of view matrix, using the same convention as gluLookAt. */
void setViewMatrixAsLookAt(const osg::Vec3& eye,const osg::Vec3& center,const osg::Vec3& up);
/** Set the draw buffer value used at the start of each frame draw. Note, overridden in quad buffer stereo mode */
void setDrawBufferValue( GLenum drawBufferValue )
{
_drawBufferValue = drawBufferValue;
}
/** Get the draw buffer value used at the start of each frame draw. */
GLenum getDrawBufferValue() const
{
return _drawBufferValue;
}
/** Get the view matrix. */
osg::Matrixd& getViewMatrix() { return _viewMatrix; }
@@ -296,10 +307,10 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
/** Set the FusionDistanceMode and Value. Note, is used only when working in stereo.*/
void setFusionDistance(FusionDistanceMode mode,float value=1.0f)
{
_fusionDistanceMode = mode;
_fusionDistanceValue = value;
}
{
_fusionDistanceMode = mode;
_fusionDistanceValue = value;
}
/** Get the FusionDistanceMode.*/
FusionDistanceMode getFusionDistanceMode() const { return _fusionDistanceMode; }
@@ -472,6 +483,8 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
bool _prioritizeTextures;
GLenum _drawBufferValue;
};
}