This might be a documentation issue, but I don't see a way to choose whether you are getting a legacy, compatibility or core context. The examples seem to point to a legacy or compatibility context.
There instances where you want to have the ability to choose, like for testing code compatibility. You may also want to specifically get an OpenGL ES context to validate your code will run on systems that only support OpenGL ES.
(The source code would also be nice as well so one could see what it's doing ;-)
Thanks!