123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- #ifndef __eglplatform_h_
- #define __eglplatform_h_
- #include <KHR/khrplatform.h>
- #ifndef EGLAPI
- #define EGLAPI KHRONOS_APICALL
- #endif
- #ifndef EGLAPIENTRY
- #define EGLAPIENTRY KHRONOS_APIENTRY
- #endif
- #define EGLAPIENTRYP EGLAPIENTRY*
- #if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES) || defined(WIN_INTERFACE_CUSTOM)
- typedef void *EGLNativeDisplayType;
- typedef void *EGLNativePixmapType;
- typedef void *EGLNativeWindowType;
- #elif defined(KDWIN)
- typedef void *EGLNativeDisplayType;
- typedef void *EGLNativePixmapType;
- typedef struct KDWindow *EGLNativeWindowType;
- #elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
- #ifndef WIN32_LEAN_AND_MEAN
- #define WIN32_LEAN_AND_MEAN 1
- #endif
- #include <windows.h>
- typedef HDC EGLNativeDisplayType;
- typedef HBITMAP EGLNativePixmapType;
- typedef HWND EGLNativeWindowType;
- #elif defined(__EMSCRIPTEN__)
- typedef int EGLNativeDisplayType;
- typedef int EGLNativePixmapType;
- typedef int EGLNativeWindowType;
- #elif defined(__WINSCW__) || defined(__SYMBIAN32__)
- typedef int EGLNativeDisplayType;
- typedef void *EGLNativePixmapType;
- typedef void *EGLNativeWindowType;
- #elif defined(WL_EGL_PLATFORM)
- typedef struct wl_display *EGLNativeDisplayType;
- typedef struct wl_egl_pixmap *EGLNativePixmapType;
- typedef struct wl_egl_window *EGLNativeWindowType;
- #elif defined(__GBM__)
- typedef struct gbm_device *EGLNativeDisplayType;
- typedef struct gbm_bo *EGLNativePixmapType;
- typedef void *EGLNativeWindowType;
- #elif defined(__ANDROID__) || defined(ANDROID)
- struct ANativeWindow;
- struct egl_native_pixmap_t;
- typedef void* EGLNativeDisplayType;
- typedef struct egl_native_pixmap_t* EGLNativePixmapType;
- typedef struct ANativeWindow* EGLNativeWindowType;
- #elif defined(USE_OZONE)
- typedef intptr_t EGLNativeDisplayType;
- typedef intptr_t EGLNativePixmapType;
- typedef intptr_t EGLNativeWindowType;
- #elif defined(__unix__) && defined(EGL_NO_X11)
- typedef void *EGLNativeDisplayType;
- typedef khronos_uintptr_t EGLNativePixmapType;
- typedef khronos_uintptr_t EGLNativeWindowType;
- #elif defined(WAYLAND)
- #include <wayland-client.h>
- typedef struct wl_display *EGLNativeDisplayType;
- typedef void *EGLNativePixmapType;
- typedef struct wl_egl_window *EGLNativeWindowType;
- #elif defined(__unix__) || defined(USE_X11)
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
- typedef Display *EGLNativeDisplayType;
- typedef Pixmap EGLNativePixmapType;
- typedef Window EGLNativeWindowType;
- #elif defined(__APPLE__)
- typedef int EGLNativeDisplayType;
- typedef void *EGLNativePixmapType;
- typedef void *EGLNativeWindowType;
- #elif defined(__HAIKU__)
- #include <kernel/image.h>
- typedef void *EGLNativeDisplayType;
- typedef khronos_uintptr_t EGLNativePixmapType;
- typedef khronos_uintptr_t EGLNativeWindowType;
- #elif defined(__Fuchsia__)
- typedef void *EGLNativeDisplayType;
- typedef khronos_uintptr_t EGLNativePixmapType;
- typedef khronos_uintptr_t EGLNativeWindowType;
- #else
- #error "Platform not recognized"
- #endif
- typedef EGLNativeDisplayType NativeDisplayType;
- typedef EGLNativePixmapType NativePixmapType;
- typedef EGLNativeWindowType NativeWindowType;
- typedef khronos_int32_t EGLint;
- #if defined(__cplusplus)
- #define EGL_CAST(type, value) (static_cast<type>(value))
- #else
- #define EGL_CAST(type, value) ((type) (value))
- #endif
- #endif
|