Seperated EGL utility functions from multi_tex