diff --git a/include/QF/GL/extensions.h b/include/QF/GL/extensions.h index 118633e71..5d0b63d52 100644 --- a/include/QF/GL/extensions.h +++ b/include/QF/GL/extensions.h @@ -33,11 +33,18 @@ #include "QF/GL/defines.h" #include "QF/GL/types.h" -#ifdef _WIN32 -# include -# define GLAPIENTRY WINAPI -#else -# define GLAPIENTRY +// Define GLAPIENTRY to a useful value +#ifndef GLAPIENTRY +# ifdef _WIN32 +# include +# define GLAPIENTRY WINAPI +# else +# ifdef APIENTRY +# define GLAPIENTRY APIENTRY +# else +# define GLAPIENTRY +# endif +# endif #endif // OpenGL numbers for extensions we use or want to use diff --git a/include/QF/GL/funcs.h b/include/QF/GL/funcs.h index 3a9844bc5..76a4f3113 100644 --- a/include/QF/GL/funcs.h +++ b/include/QF/GL/funcs.h @@ -33,6 +33,10 @@ #include "QF/GL/types.h" #include "QF/qtypes.h" +#ifdef _WIN32 +# include +#endif + #define QFGL_NEED(ret, name, args) extern ret (GLAPIENTRY * qf##name) args #include "QF/GL/qf_funcs_list.h" #undef QFGL_NEED