diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 8471a358..158929f0 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -68,10 +68,6 @@ #define GBM_BO_USE_CURSOR GBM_BO_USE_CURSOR_64X64 #endif -#ifndef EGL_PLATFORM_GBM_KHR -#define EGL_PLATFORM_GBM_KHR 0x31D7 -#endif - static int option_current_mode = 0; enum output_config { diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index 84c87315..9b851b75 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -47,10 +47,6 @@ #define WINDOW_TITLE "Weston Compositor" -#ifndef EGL_PLATFORM_WAYLAND_KHR -#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 -#endif - struct wayland_compositor { struct weston_compositor base; diff --git a/src/compositor-x11.c b/src/compositor-x11.c index fd914d74..3ef446cf 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -55,10 +55,6 @@ #define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10) -#ifndef EGL_PLATFORM_X11_KHR -#define EGL_PLATFORM_X11_KHR 0x31D5 -#endif - static int option_width; static int option_height; static int option_scale; diff --git a/src/gl-renderer.h b/src/gl-renderer.h index 9e4b2200..2434fddc 100644 --- a/src/gl-renderer.h +++ b/src/gl-renderer.h @@ -39,6 +39,18 @@ typedef intptr_t EGLNativeDisplayType; typedef intptr_t EGLNativeWindowType; #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +#endif /* ENABLE_EGL */ + +#ifndef EGL_PLATFORM_GBM_KHR +#define EGL_PLATFORM_GBM_KHR 0x31D7 +#endif + +#ifndef EGL_PLATFORM_WAYLAND_KHR +#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 +#endif + +#ifndef EGL_PLATFORM_X11_KHR +#define EGL_PLATFORM_X11_KHR 0x31D5 #endif enum gl_renderer_border_side {