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

Handle expanded tokens #371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Handle expanded tokens #371

wants to merge 1 commit into from

Conversation

vvuk
Copy link

@vvuk vvuk commented Oct 21, 2022

Extensions, especially EGL, now have tokens like:

EGL_TIMESTAMP_PENDING_ANDROID EGL_CAST(EGLnsecsANDROID,-2)
EGL_COLORSPACE_sRGB 0x3089
EGL_NO_NATIVE_FENCE_FD_ANDROID -1

This expands the tokens regex to handle them.

Unfortunately this now leads to warnings like:

include/GL/eglew.h:186:9: warning: 'EGL_NO_SURFACE' macro redefined [-Wmacro-redefined]
#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
        ^
include/GL/eglew.h:170:9: note: previous definition is here
#define EGL_NO_SURFACE                    ((EGLSurface)0)

I think the non-EGL_CAST version comes from auto/glfixes but I don't know if the fix is to just delete these entries from there? EGL_CAST is in eglplatform so no issues with having things defined in terms of it.

Extensions, especially EGL, now have tokens like:

EGL_TIMESTAMP_PENDING_ANDROID EGL_CAST(EGLnsecsANDROID,-2)
EGL_COLORSPACE_sRGB 0x3089
EGL_NO_NATIVE_FENCE_FD_ANDROID -1
@nigels-com
Copy link
Owner

Interesting, thanks.

@nigels-com
Copy link
Owner

I think it would preferable for eglew.h not to depend on the EGL_CAST macro.
On the assumption that EGL_CAST macro is something added, that can't always be assumed.
Perhaps ideally they could be converted from EGL_CAST(EGLSurface,0) ((EGLSurface)0) for compatibility purposes?

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

Successfully merging this pull request may close these issues.

2 participants