Added osg::resizeGLObjectBuffers(..) and osg::releaseGLObjects(..) functions to make it easier to call these methods on objects which ref_ptr<> or C pointers are held for.
This commit is contained in:
@@ -374,6 +374,14 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
inline void resizeGLObjectBuffers(osg::Object* object, unsigned int maxSize) { if (object) object->resizeGLObjectBuffers(maxSize); }
|
||||
|
||||
template<class T> void resizeGLObjectBuffers(const osg::ref_ptr<T>& 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<class T> void releaseGLObjects(const osg::ref_ptr<T>& object, osg::State* state = 0) { if (object.valid()) object->releaseGLObjects(state); }
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user