Added template addShader() method to make it easier to pass ref_ptr<osg::Shader>

This commit is contained in:
Robert Osfield 2017-11-27 15:40:21 +00:00
parent 9fc63d7613
commit cb2c48d015

View File

@ -68,6 +68,8 @@ class OSGSHADOW_EXPORT ShadowMap : public ShadowTechnique
/** Add a shader to internal list, will be used instead of the default ones */
inline void addShader(osg::Shader* shader) { _shaderList.push_back(shader); }
template<class T> void addShader( const osg::ref_ptr<T>& shader ) { addShader(shader.get()); }
/** Reset internal shader list */
inline void clearShaderList() { _shaderList.clear(); }