Yes you could do it that way. Although both approaches require a stupid/ugly linear search.
I suggest what is proposed here is a bit cleaner though. Because it allows the toolkit/app to choose its config in a way that is not bound to the limited/changeable list of Mir pixel formats. In fact, this way the toolkit/app never even has to see what its Mir pixel format is.
Yes you could do it that way. Although both approaches require a stupid/ugly linear search.
I suggest what is proposed here is a bit cleaner though. Because it allows the toolkit/app to choose its config in a way that is not bound to the limited/changeable list of Mir pixel formats. In fact, this way the toolkit/app never even has to see what its Mir pixel format is.
Setting up EGL before creating the native window is also how the EGL docs approach it: /www.khronos. org/registry/ egl/sdk/ docs/man/ html/eglIntro. xhtml
https:/