From c078968f666bd5bfc5027f248dbb42421c9ac395 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 4 May 2018 10:54:02 +0100 Subject: [PATCH] Added non const version of State::getActiveDisplaySettings() --- include/osg/State | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/osg/State b/include/osg/State index c2132bdad..765eab737 100644 --- a/include/osg/State +++ b/include/osg/State @@ -834,11 +834,13 @@ class OSG_EXPORT State : public Referenced /** Get the const DisplaySettings */ inline const DisplaySettings* getDisplaySettings() const { return _displaySettings.get(); } + /** Get the DisplaySettings that is current active DisplaySettings to be used by osg::State, - if DisplaySettings is not directly assigned then fallback to DisplaySettings::instance(). */ + inline DisplaySettings* getActiveDisplaySettings() { return _displaySettings.valid() ? _displaySettings.get() : osg::DisplaySettings::instance().get(); } + /** Get the const DisplaySettings that is current active DisplaySettings to be used by osg::State, - if DisplaySettings is not directly assigned then fallback to DisplaySettings::instance(). */ inline const DisplaySettings* getActiveDisplaySettings() const { return _displaySettings.valid() ? _displaySettings.get() : osg::DisplaySettings::instance().get(); } - /** Set flag for early termination of the draw traversal.*/ void setAbortRenderingPtr(bool* abortPtr) { _abortRenderingPtr = abortPtr; }