Skip to content

Commit

Permalink
Fix Windows warnings about APIENTRY from GLAD library (#2339)
Browse files Browse the repository at this point in the history
* Fix Windows warnings about APIENTRY from GLAD library

* Fix GLAD compilation issue on Mac/Linux
  • Loading branch information
totalgee authored Feb 6, 2025
1 parent 3ef3f78 commit 93b91a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/glad/glad.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@
#define __gl_h_

#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
#pragma push_macro("APIENTRY")
#define GLAD_PUSHED_APIENTRY
#define APIENTRY __stdcall
#endif

Expand Down Expand Up @@ -14158,4 +14160,9 @@ GLAPI int GLAD_GL_S3_s3tc;
}
#endif

#ifdef GLAD_PUSHED_APIENTRY
#undef GLAD_PUSHED_APIENTRY
#pragma pop_macro("APIENTRY")
#endif // GLAD_PUSHED_APIENTRY

#endif

0 comments on commit 93b91a8

Please sign in to comment.