Made s/getBackgroundColor() deprecated, and add in new s/getClearColor() to
replace it.
This commit is contained in:
@@ -97,11 +97,21 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
|
||||
inline osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); }
|
||||
|
||||
|
||||
#ifdef USE_DEPRECATED_API
|
||||
/** Set the background color used in glClearColor().
|
||||
Defaults to an off blue color.*/
|
||||
void setBackgroundColor(const osg::Vec4& color) { _backgroundColor=color; }
|
||||
void setBackgroundColor(const osg::Vec4& color) { _clearColor=color; }
|
||||
/** Get the background color.*/
|
||||
const osg::Vec4& getBackgroundColor() const { return _backgroundColor; }
|
||||
const osg::Vec4& getBackgroundColor() const { return _clearColor; }
|
||||
#endif
|
||||
|
||||
/** Set the color used in glClearColor().
|
||||
Defaults to an off blue color.*/
|
||||
void setClearColor(const osg::Vec4& color) { _clearColor=color; }
|
||||
/** Get the color usinged in glClearColor.*/
|
||||
const osg::Vec4& getClearColor() const { return _clearColor; }
|
||||
|
||||
|
||||
|
||||
void setGlobalStateSet(osg::StateSet* state) { _globalStateSet = state; }
|
||||
osg::StateSet* getGlobalStateSet() { return _globalStateSet.get(); }
|
||||
@@ -478,7 +488,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
|
||||
osg::ref_ptr<osg::FrameStamp> _frameStamp;
|
||||
|
||||
|
||||
osg::Vec4 _backgroundColor;
|
||||
osg::Vec4 _clearColor;
|
||||
|
||||
CullVisitor::ComputeNearFarMode _computeNearFar;
|
||||
osg::CullStack::CullingMode _cullingMode;
|
||||
|
||||
@@ -34,7 +34,7 @@ SceneView::SceneView(DisplaySettings* ds)
|
||||
{
|
||||
_displaySettings = ds;
|
||||
|
||||
_backgroundColor.set(0.2f, 0.2f, 0.4f, 1.0f);
|
||||
_clearColor.set(0.2f, 0.2f, 0.4f, 1.0f);
|
||||
|
||||
_computeNearFar = CullVisitor::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES;
|
||||
|
||||
@@ -132,7 +132,7 @@ void SceneView::setDefaults()
|
||||
lightmodel->setAmbientIntensity(osg::Vec4(0.1f,0.1f,0.1f,1.0f));
|
||||
_globalStateSet->setAttributeAndModes(lightmodel, osg::StateAttribute::ON);
|
||||
|
||||
_backgroundColor.set(0.2f, 0.2f, 0.4f, 1.0f);
|
||||
_clearColor.set(0.2f, 0.2f, 0.4f, 1.0f);
|
||||
|
||||
_cullMask = 0xffffffff;
|
||||
_cullMaskLeft = 0xffffffff;
|
||||
@@ -550,7 +550,7 @@ void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
|
||||
rendergraph->clean();
|
||||
|
||||
renderStage->setViewport(_viewport.get());
|
||||
renderStage->setClearColor(_backgroundColor);
|
||||
renderStage->setClearColor(_clearColor);
|
||||
|
||||
|
||||
switch(_lightingMode)
|
||||
|
||||
Reference in New Issue
Block a user