gl: avoid grabbing viewport on each render

Same as 518556b45b61de06a0bc810147cd1a6347497461 but for GL
GL: switch to CPU based matrix caculations to match GLES

This drops use of glGet which causes a performance hit on some systems since
it forces a glFinish()
GL(ES): Simplify matrix stack handling
fixup! GL(ES): Simplify matrix stack handling
squash: Fixup build after glGet