diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 6f189274..52225c74 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -6383,6 +6383,7 @@ GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window */ #ifndef GLAPIENTRY #define GLAPIENTRY APIENTRY + #define GLFW_GLAPIENTRY_DEFINED #endif /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ diff --git a/include/GLFW/glfw3native.h b/include/GLFW/glfw3native.h index 7f5bf9e4..6d090778 100644 --- a/include/GLFW/glfw3native.h +++ b/include/GLFW/glfw3native.h @@ -116,7 +116,10 @@ extern "C" { * default it also acts as an OpenGL header * However, glx.h will include gl.h, which will define it unconditionally */ - #undef GLAPIENTRY + #if defined(GLFW_GLAPIENTRY_DEFINED) + #undef GLAPIENTRY + #undef GLFW_GLAPIENTRY_DEFINED + #endif #include #endif #if defined(GLFW_EXPOSE_NATIVE_EGL) @@ -127,7 +130,10 @@ extern "C" { * default it also acts as an OpenGL header * However, osmesa.h will include gl.h, which will define it unconditionally */ - #undef GLAPIENTRY + #if defined(GLFW_GLAPIENTRY_DEFINED) + #undef GLAPIENTRY + #undef GLFW_GLAPIENTRY_DEFINED + #endif #include #endif