GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
Certain glGet operations require 64 bit versions according to the GLES spec.
The previous code was susceptible to overflow bugs, especially running under ANGLE.