EGL: separate config and context code