modify server gl main loops