added checks for null framebuffers (useful to allow for "dummy"
renderers such as GLW)