I don’t think the header files should affect the context you are getting. The only thing I can think of is to make sure you are setting those attributes before creating the context, but that seems rather obvious. Also, maybe it can depend on which xcode version / which ios simulator you are using as at least some of the actual old devices don’t support ES 3.
For me the the emulator gives these versions respectively:
OpenGL ES 2.0 APPLE-12.0.41
OpenGL ES 3.0 APPLE-12.0.41
I wonder why I’m getting an older version number for ES2. I’m using the latest Xcode. Maybe it’s the quite old simulator I was using to test (iPhone 4s).
For headers I’m personally using the platforms own header files directly with some if-defs. You can look into
SDL_opengles2.h and see what it could look like.
for ios use
for android and others use:
Still, as SDL is providing a header for ES 2 it should probably add, headers for 3.0, 3.1 and 3.2 too.