Fix viewport being upside down in OpenGL renderer.

Fixes Bugzilla #2207.

--HG--
extra : rebase_source : 1a31c7757418646fbba14b89482d4b9f11aafdc5
extra : amend_source : 3b77354d8d958923a94f3b40a6017fa3b08bf44a