OLD | NEW |
---|---|
1 #ifndef __eglplatform_h_ | 1 #ifndef __eglplatform_h_ |
2 #define __eglplatform_h_ | 2 #define __eglplatform_h_ |
3 | 3 |
4 /* | 4 /* |
5 ** Copyright (c) 2007-2009 The Khronos Group Inc. | 5 ** Copyright (c) 2007-2009 The Khronos Group Inc. |
6 ** | 6 ** |
7 ** Permission is hereby granted, free of charge, to any person obtaining a | 7 ** Permission is hereby granted, free of charge, to any person obtaining a |
8 ** copy of this software and/or associated documentation files (the | 8 ** copy of this software and/or associated documentation files (the |
9 ** "Materials"), to deal in the Materials without restriction, including | 9 ** "Materials"), to deal in the Materials without restriction, including |
10 ** without limitation the rights to use, copy, modify, merge, publish, | 10 ** without limitation the rights to use, copy, modify, merge, publish, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 * Windows Device Context. They must be defined in platform-specific | 60 * Windows Device Context. They must be defined in platform-specific |
61 * code below. The EGL-prefixed versions of Native*Type are the same | 61 * code below. The EGL-prefixed versions of Native*Type are the same |
62 * types, renamed in EGL 1.3 so all types in the API start with "EGL". | 62 * types, renamed in EGL 1.3 so all types in the API start with "EGL". |
63 * | 63 * |
64 * Khronos STRONGLY RECOMMENDS that you use the default definitions | 64 * Khronos STRONGLY RECOMMENDS that you use the default definitions |
65 * provided below, since these changes affect both binary and source | 65 * provided below, since these changes affect both binary and source |
66 * portability of applications using EGL running on different EGL | 66 * portability of applications using EGL running on different EGL |
67 * implementations. | 67 * implementations. |
68 */ | 68 */ |
69 | 69 |
70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__S CITECH_SNAP__) /* Win32 and WinCE */ | 70 #include "ppapi/c/pp_instance.h" |
71 #ifndef WIN32_LEAN_AND_MEAN | 71 #include "ppapi/c/pp_module.h" |
72 #define WIN32_LEAN_AND_MEAN 1 | |
73 #endif | |
74 #include <windows.h> | |
75 | 72 |
76 typedef HDC EGLNativeDisplayType; | 73 typedef PP_Module EGLNativeDisplayType; |
piman
2010/12/15 18:49:35
Shouldn't EGLNativeDisplayType be a PP_Instance, a
alokp
2010/12/15 18:54:53
Not sure about EGLNativeDisplayType at this time.
| |
77 typedef HBITMAP EGLNativePixmapType; | 74 typedef PP_Instance EGLNativeWindowType; |
78 typedef HWND EGLNativeWindowType; | 75 typedef khronos_int32_t EGLNativePixmapType; // Not supported. |
79 | |
80 #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ | |
81 | |
82 typedef int EGLNativeDisplayType; | |
83 typedef void *EGLNativeWindowType; | |
84 typedef void *EGLNativePixmapType; | |
85 | |
86 #elif defined(__unix__) | |
87 | |
88 /* X11 (tentative) */ | |
89 #include <X11/Xlib.h> | |
90 #include <X11/Xutil.h> | |
91 | |
92 typedef Display *EGLNativeDisplayType; | |
93 typedef Pixmap EGLNativePixmapType; | |
94 typedef Window EGLNativeWindowType; | |
95 | |
96 #else | |
97 /* #error "Platform not recognized" */ | |
98 | |
99 typedef int EGLNativeDisplayType; | |
100 typedef int EGLNativePixmapType; | |
101 typedef int EGLNativeWindowType; | |
102 | |
103 #endif | |
104 | 76 |
105 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ | 77 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ |
106 typedef EGLNativeDisplayType NativeDisplayType; | 78 typedef EGLNativeDisplayType NativeDisplayType; |
107 typedef EGLNativePixmapType NativePixmapType; | 79 typedef EGLNativePixmapType NativePixmapType; |
108 typedef EGLNativeWindowType NativeWindowType; | 80 typedef EGLNativeWindowType NativeWindowType; |
109 | 81 |
110 | 82 |
111 /* Define EGLint. This must be a signed integral type large enough to contain | 83 /* Define EGLint. This must be a signed integral type large enough to contain |
112 * all legal attribute names and values passed into and out of EGL, whether | 84 * all legal attribute names and values passed into and out of EGL, whether |
113 * their type is boolean, bitmask, enumerant (symbolic constant), integer, | 85 * their type is boolean, bitmask, enumerant (symbolic constant), integer, |
114 * handle, or other. While in general a 32-bit integer will suffice, if | 86 * handle, or other. While in general a 32-bit integer will suffice, if |
115 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit | 87 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit |
116 * integer type. | 88 * integer type. |
117 */ | 89 */ |
118 typedef khronos_int32_t EGLint; | 90 typedef khronos_int32_t EGLint; |
119 | 91 |
120 #endif /* __eglplatform_h */ | 92 #endif /* __eglplatform_h */ |
OLD | NEW |