khronos-egl icon indicating copy to clipboard operation
khronos-egl copied to clipboard

Add call to egl.bind_api in example in README.md

Open invpt opened this issue 1 year ago • 0 comments

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.

invpt avatar Jan 17 '24 07:01 invpt