diff --git a/include/osg/Object b/include/osg/Object index 3ff78a374..aee80a8be 100644 --- a/include/osg/Object +++ b/include/osg/Object @@ -374,6 +374,14 @@ protected: }; +inline void resizeGLObjectBuffers(osg::Object* object, unsigned int maxSize) { if (object) object->resizeGLObjectBuffers(maxSize); } + +template void resizeGLObjectBuffers(const osg::ref_ptr& object, unsigned int maxSize) { if (object.valid()) object->resizeGLObjectBuffers(maxSize); } + +inline void releaseGLObjects(osg::Object* object, osg::State* state = 0) { if (object) object->releaseGLObjects(state); } + +template void releaseGLObjects(const osg::ref_ptr& object, osg::State* state = 0) { if (object.valid()) object->releaseGLObjects(state); } + } #endif