consume the error flag before complaining in glGet