Browse Source

Allow combining Vulkan and GL/GLES header macros

Camilla Berglund 9 years ago
parent
commit
433db8f9f9
3 changed files with 8 additions and 5 deletions
  1. 2 0
      README.md
  2. 3 3
      docs/build.dox
  3. 3 2
      include/GLFW/glfw3.h

+ 2 - 0
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)
 
 

+ 3 - 3
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.

+ 3 - 2
include/GLFW/glfw3.h

@@ -165,8 +165,6 @@ extern "C" {
   #if defined(GLFW_INCLUDE_GLEXT)
    #include <GLES2/gl2ext.h>
   #endif
- #elif defined(GLFW_INCLUDE_VULKAN)
-  #include <vulkan/vulkan.h>
  #elif !defined(GLFW_INCLUDE_NONE)
   #include <GL/gl.h>
   #if defined(GLFW_INCLUDE_GLEXT)
@@ -177,6 +175,9 @@ extern "C" {
   #include <GL/glu.h>
  #endif
 #endif
+#if defined(GLFW_INCLUDE_VULKAN)
+ #include <vulkan/vulkan.h>
+#endif
 
 #if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
  /* GLFW_DLL must be defined by applications that are linking against the DLL