mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Allow exposing only native context APIs
Fixes 1349.
This commit is contained in:
parent
64c034edfb
commit
6a199c1f5e
@ -81,7 +81,7 @@ extern "C" {
|
|||||||
* System headers and types
|
* System headers and types
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#if defined(GLFW_EXPOSE_NATIVE_WIN32)
|
#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||||
// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
|
// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
|
||||||
// example to allow applications to correctly declare a GL_ARB_debug_output
|
// example to allow applications to correctly declare a GL_ARB_debug_output
|
||||||
// callback) but windows.h assumes no one will define APIENTRY before it does
|
// callback) but windows.h assumes no one will define APIENTRY before it does
|
||||||
@ -90,14 +90,14 @@ extern "C" {
|
|||||||
#undef GLFW_APIENTRY_DEFINED
|
#undef GLFW_APIENTRY_DEFINED
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(GLFW_EXPOSE_NATIVE_COCOA)
|
#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
|
||||||
#if defined(__OBJC__)
|
#if defined(__OBJC__)
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#else
|
#else
|
||||||
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
typedef void* id;
|
typedef void* id;
|
||||||
#endif
|
#endif
|
||||||
#elif defined(GLFW_EXPOSE_NATIVE_X11)
|
#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/extensions/Xrandr.h>
|
#include <X11/extensions/Xrandr.h>
|
||||||
#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||||
|
Loading…
Reference in New Issue
Block a user