From 538a83dad43410e9f1bfdf801d0c8cd1e1c2c420 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 4 Apr 2007 09:07:46 +0000 Subject: [PATCH] Added support for flushing buffer objects --- include/osg/BufferObject | 2 +- src/osgUtil/SceneView.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/osg/BufferObject b/include/osg/BufferObject index c000b1667..f654f10a2 100644 --- a/include/osg/BufferObject +++ b/include/osg/BufferObject @@ -137,7 +137,7 @@ class OSG_EXPORT BufferObject : public Object /** flush all the cached display list which need to be deleted * in the OpenGL context related to contextID.*/ - void flushDeletedBufferObjects(unsigned int contextID,double /*currentTime*/, double& availableTime); + static void flushDeletedBufferObjects(unsigned int contextID,double /*currentTime*/, double& availableTime); /** Extensions class which encapsulates the querying of extensions and * associated function pointers, and provide convenience wrappers to diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index 5141d7116..5bdf66c80 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -817,6 +818,7 @@ void SceneView::flushAllDeletedGLObjects() osg::FragmentProgram::flushDeletedFragmentProgramObjects(state->getContextID(),currentTime,availableTime); osg::Program::flushDeletedGlPrograms(state->getContextID(),currentTime,availableTime); osg::Shader::flushDeletedGlShaders(state->getContextID(),currentTime,availableTime); + osg::BufferObject::flushDeletedBufferObjects(state->getContextID(),currentTime,availableTime); } void SceneView::flushDeletedGLObjects(double& availableTime) @@ -836,6 +838,7 @@ void SceneView::flushDeletedGLObjects(double& availableTime) osg::FragmentProgram::flushDeletedFragmentProgramObjects(state->getContextID(),currentTime,availableTime); osg::Program::flushDeletedGlPrograms(state->getContextID(),currentTime,availableTime); osg::Shader::flushDeletedGlShaders(state->getContextID(),currentTime,availableTime); + osg::BufferObject::flushDeletedBufferObjects(state->getContextID(),currentTime,availableTime); } void SceneView::draw()