DoRender( instruction );
}
-
- if ( mImpl->currentContext->IsSurfacelessContextSupported() )
- {
- mImpl->glContextHelperAbstraction.MakeSurfacelessContextCurrent();
- }
-
- GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
- mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
- for ( auto&& context : mImpl->surfaceContextContainer )
- {
- context->InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
- }
}
//Notify RenderGeometries that rendering has finished
{
mImpl->currentContext->Flush();
}
+
+ if( instruction.mFrameBuffer && instruction.mFrameBuffer->IsSurfaceBacked() )
+ {
+ GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
+ mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+ }
}
} // namespace SceneGraph