Preliminary work for EGL implementation

cc #152