| #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(_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 void* 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(__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 |
|
|