Issue 3402

@phtaylor viewport callbacks + refactoring
it's possible that another system will perform swapbuffers. the Oculus rift SDK rendering for example does this.