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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user