Added support for subsititing $VAR_NAME entries in shaders to enable writing shaders that work across GLSL versions.

This commit is contained in:
Robert Osfield
2017-09-18 18:09:15 +01:00
parent 5ade852172
commit cc7cf54353
5 changed files with 179 additions and 21 deletions

View File

@@ -823,9 +823,12 @@ class OSG_EXPORT State : public Referenced
* during rendering. */
inline void setDisplaySettings(DisplaySettings* vs) { _displaySettings = vs; }
/** Get the DisplaySettings */
/** Get the const DisplaySettings */
inline const DisplaySettings* getDisplaySettings() const { return _displaySettings.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.*/