moved egl setup out of main and into display