From cb2c48d01511ad2af1b3d461d472a908d793ba2b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Nov 2017 15:40:21 +0000 Subject: [PATCH] Added template addShader() method to make it easier to pass ref_ptr --- include/osgShadow/ShadowMap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/osgShadow/ShadowMap b/include/osgShadow/ShadowMap index cec66ac20..535ba9c4c 100644 --- a/include/osgShadow/ShadowMap +++ b/include/osgShadow/ShadowMap @@ -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 void addShader( const osg::ref_ptr& shader ) { addShader(shader.get()); } + /** Reset internal shader list */ inline void clearShaderList() { _shaderList.clear(); }