Add common GL code in glitchmain to glitchmain_common.cpp