It seems that there is no such thing as eglGetProcAddress() and thus we
are able to use only functions that are defined in the ES[23]/glext.h
header and no others. So, currently, the function loader internally
undefs all function name macros that were defined in our flextgl.h
header, then includes the Apple's glext.h header and assigns function
pointers of those extensions that are defined in the header. Apple also
has some minor differences in function signatures (different constness
of pointer-to-pointer variables) so I had to reinterpret_cast
everything.
Might seem to be uglier than including glext.h directly in our code,
but I made bad experience when doing so -- I want to depend on my
header bugs that are consistent across all platforms instead of
depending on whatever changes Apple makes in its headers. I also want to
have all functions defined and not only those that are supported on
iOS.
Phew. Thank you, flextGL, for making it way easier than it appeared to
be at first.
The function pointer loading is now moved to Application classes to make
it possible to decide about platform-specific API at usage time, not at
library compilation time.
Currently it's not possible to create the Magnum context any other way
than through Application classes, will solve that in next commits.