mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Additional client API logic cleanup
This commit is contained in:
parent
018ae69b33
commit
fa0b5e1b85
@ -134,71 +134,97 @@ extern "C" {
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
/* Include because it is needed by Vulkan and related functions.
|
/* Include because it is needed by Vulkan and related functions.
|
||||||
|
* Include it unconditionally to avoid surprising side-effects.
|
||||||
*/
|
*/
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/* Include the chosen client API headers.
|
/* Include the chosen OpenGL or OpenGL ES headers.
|
||||||
*/
|
*/
|
||||||
#if defined(GLFW_INCLUDE_ES1)
|
#if defined(GLFW_INCLUDE_ES1)
|
||||||
|
|
||||||
#include <GLES/gl.h>
|
#include <GLES/gl.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <GLES/glext.h>
|
#include <GLES/glext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(GLFW_INCLUDE_ES2)
|
#elif defined(GLFW_INCLUDE_ES2)
|
||||||
|
|
||||||
#include <GLES2/gl2.h>
|
#include <GLES2/gl2.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(GLFW_INCLUDE_ES3)
|
#elif defined(GLFW_INCLUDE_ES3)
|
||||||
|
|
||||||
#include <GLES3/gl3.h>
|
#include <GLES3/gl3.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(GLFW_INCLUDE_ES31)
|
#elif defined(GLFW_INCLUDE_ES31)
|
||||||
|
|
||||||
#include <GLES3/gl31.h>
|
#include <GLES3/gl31.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(GLFW_INCLUDE_ES32)
|
#elif defined(GLFW_INCLUDE_ES32)
|
||||||
|
|
||||||
#include <GLES3/gl32.h>
|
#include <GLES3/gl32.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#if defined(GLFW_INCLUDE_GLCOREARB)
|
#elif defined(GLFW_INCLUDE_GLCOREARB)
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
|
||||||
#include <OpenGL/gl3.h>
|
#include <OpenGL/gl3.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <OpenGL/gl3ext.h>
|
#include <OpenGL/gl3ext.h>
|
||||||
#endif
|
#endif /*GLFW_INCLUDE_GLEXT*/
|
||||||
|
|
||||||
|
#else /*__APPLE__*/
|
||||||
|
|
||||||
|
#include <GL/glcorearb.h>
|
||||||
|
|
||||||
|
#endif /*__APPLE__*/
|
||||||
|
|
||||||
#elif !defined(GLFW_INCLUDE_NONE)
|
#elif !defined(GLFW_INCLUDE_NONE)
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
|
||||||
#if !defined(GLFW_INCLUDE_GLEXT)
|
#if !defined(GLFW_INCLUDE_GLEXT)
|
||||||
#define GL_GLEXT_LEGACY
|
#define GL_GLEXT_LEGACY
|
||||||
#endif
|
#endif
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
#endif
|
|
||||||
#if defined(GLFW_INCLUDE_GLU)
|
#if defined(GLFW_INCLUDE_GLU)
|
||||||
#include <OpenGL/glu.h>
|
#include <OpenGL/glu.h>
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
#if defined(GLFW_INCLUDE_GLCOREARB)
|
#else /*__APPLE__*/
|
||||||
#include <GL/glcorearb.h>
|
|
||||||
#elif !defined(GLFW_INCLUDE_NONE)
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#if defined(GLFW_INCLUDE_GLEXT)
|
#if defined(GLFW_INCLUDE_GLEXT)
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#if defined(GLFW_INCLUDE_GLU)
|
#if defined(GLFW_INCLUDE_GLU)
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
#endif /*__APPLE__*/
|
||||||
|
|
||||||
|
#endif /* OpenGL and OpenGL ES headers */
|
||||||
|
|
||||||
#if defined(GLFW_INCLUDE_VULKAN)
|
#if defined(GLFW_INCLUDE_VULKAN)
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <MoltenVK/vulkan/vulkan.h>
|
#include <MoltenVK/vulkan/vulkan.h>
|
||||||
#else
|
#else
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
#endif /* Vulkan header */
|
||||||
|
|
||||||
#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
|
#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
|
||||||
/* GLFW_DLL must be defined by applications that are linking against the DLL
|
/* GLFW_DLL must be defined by applications that are linking against the DLL
|
||||||
|
Loading…
Reference in New Issue
Block a user