Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if an extension is supported, before calling function pointer returned by eglGelProcAddress #317

Open
jschwe opened this issue Sep 6, 2024 · 1 comment

Comments

@jschwe
Copy link
Member

jschwe commented Sep 6, 2024

A non-NULL return value does not guarantee that an extension function is actually supported at runtime. The client must also make a corresponding query, such as glGetString(GL_EXTENSIONS) for OpenGL and OpenGL ES extensions; vgGetString(VG_EXTENSIONS) for OpenVG extensions; eglQueryString(display, EGL_EXTENSIONS); or query the EGL or client API version for non-extension functions, to determine if a function is supported by EGL or a specific client API context.

Source: https://registry.khronos.org/EGL/sdk/docs/man/html/eglGetProcAddress.xhtml

I haven't ran into any specific problem, but currently we are not doing this check.

@sagudev
Copy link
Member

sagudev commented Oct 13, 2024

If we move to glow (from gl_generator), it will do this checks automatically (if functions are not loaded it will panic), so it will be safer. See servo/servo#33539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants