From 433db8f9f9e3ef7a1cc001d4888d92f8ed543630 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 14 Sep 2016 21:13:33 +0200 Subject: [PATCH] Allow combining Vulkan and GL/GLES header macros --- README.md | 2 ++ docs/build.dox | 6 +++--- include/GLFW/glfw3.h | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2c676fcd..4f97da01 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ information on what to include when reporting a bug. - Added `glfwGetKeyScancode` function that allows retrieving platform dependent scancodes for keys (#830) - Bugfix: Calling `glfwMaximizeWindow` on a full screen window was not ignored +- Bugfix: `GLFW_INCLUDE_VULKAN` could not be combined with the corresponding + OpenGL and OpenGL ES header macros - [Win32] Bugfix: Undecorated windows could not be iconified by the user (#861) diff --git a/docs/build.dox b/docs/build.dox index c489acf2..20352b4b 100644 --- a/docs/build.dox +++ b/docs/build.dox @@ -80,9 +80,6 @@ header instead of the regular OpenGL header. `GLFW_INCLUDE_ES31` makes the GLFW header include the OpenGL ES 3.1 `GLES3/gl31.h` header instead of the regular OpenGL header. -`GLFW_INCLUDE_VULKAN` makes the GLFW header include the Vulkan `vulkan/vulkan.h` -header instead of the regular OpenGL header. - `GLFW_INCLUDE_NONE` makes the GLFW header not include any OpenGL or OpenGL ES API header. This is useful in combination with an extension loading library. @@ -93,6 +90,9 @@ The following macros control the inclusion of additional API headers. Any number of these may be defined simultaneously, and/or together with one of the above macros. +`GLFW_INCLUDE_VULKAN` makes the GLFW header include the Vulkan `vulkan/vulkan.h` +header in addition to any selected OpenGL or OpenGL ES header. + `GLFW_INCLUDE_GLEXT` makes the GLFW header include the appropriate extension header for the OpenGL or OpenGL ES header selected above after and in addition to that header. diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index d4c699f5..156c1f44 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -165,8 +165,6 @@ extern "C" { #if defined(GLFW_INCLUDE_GLEXT) #include #endif - #elif defined(GLFW_INCLUDE_VULKAN) - #include #elif !defined(GLFW_INCLUDE_NONE) #include #if defined(GLFW_INCLUDE_GLEXT) @@ -177,6 +175,9 @@ extern "C" { #include #endif #endif +#if defined(GLFW_INCLUDE_VULKAN) + #include +#endif #if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL) /* GLFW_DLL must be defined by applications that are linking against the DLL