khronos-egl
khronos-egl copied to clipboard
Add call to egl.bind_api in example in README.md
The sample code in the README sets the context attributes to use the OpenGL 4.0 core profile, but by default this will give a BadMatch error, because the default API is OpenGL ES, which has a maximum version of 3.2 and I believe also does not allow requesting the core profile.
Adding egl.bind_api(egl::OPENGL_API)
before the call to create_context
makes sure that this error does not occur.