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

Issues with MemoryBarrier conflicting with winnt.h macros #388

Closed
haasn opened this issue Oct 25, 2022 · 1 comment
Closed

Issues with MemoryBarrier conflicting with winnt.h macros #388

haasn opened this issue Oct 25, 2022 · 1 comment

Comments

@haasn
Copy link
Contributor

haasn commented Oct 25, 2022

When using --mx the GladGLContext contains a struct member called just MemoryBarrier, from glMemoryBarrier.

This conflicts with the MemoryBarrier macro defined in <winnt.h>, leading to compilation issues in some cases.

It might be possible to work-around this on my end but I fear that the <winapifamily.h> import inside glad pulls this symbol in. I'll investigate.

@haasn
Copy link
Contributor Author

haasn commented Oct 25, 2022

Oh, actually, I think the trick is to #undef it before importing glad/gl.h, not after, as I was currently doing. That seems to have worked around it. 🤷

@haasn haasn closed this as completed Oct 25, 2022
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

1 participant