Factorize some GL code in gpuparticle.