move stuff to GLHandler