This function essentially makes sure the right GL context is current for the passed stage.
It is not intended to be used by applications.
the Stage