Added CameraNode::releaseGLObejcts() to help in clean up, and changed the

ordering in SceneView::flushDeleteGLObjects() so that fbo's are deleted
before any texture objects they use are deleted.
This commit is contained in:
Robert Osfield
2005-12-08 10:06:57 +00:00
parent b835ec9ee9
commit 53ee0ce3ec
5 changed files with 21 additions and 4 deletions

View File

@@ -223,6 +223,14 @@ void CameraNode::detach(BufferComponent buffer)
_bufferAttachmentMap.erase(buffer);
}
void CameraNode::releaseGLObjects(osg::State* state) const
{
if (state) const_cast<CameraNode*>(this)->_renderingCache[state->getContextID()] = 0;
else const_cast<CameraNode*>(this)->_renderingCache.setAllElementsTo(0);
Transform::releaseGLObjects(state);
}
bool CameraNode::computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor*) const
{