1 #ifndef __EGL__H__
2 #define __EGL__H__
15 #define EGL_DEFAULT_DISPLAY 0
16 #define EGL_NO_CONTEXT 0
17 #define EGL_NO_DISPLAY 0
18 #define EGL_NO_SURFACE 0
20 /*
21 ** Versioning and extensions
22 */
23 #define EGL_VERSION_1_0 1
24 #define EGL_VERSION_1_1 1
26 /*
27 ** Boolean
28 */
29 #define EGL_FALSE 0
30 #define EGL_TRUE 1
32 /*
33 ** Errors
34 */
35 #define EGL_SUCCESS 0x3000
36 #define EGL_NOT_INITIALIZED 0x3001
37 #define EGL_BAD_ACCESS 0x3002
38 #define EGL_BAD_ALLOC 0x3003
39 #define EGL_BAD_ATTRIBUTE 0x3004
40 #define EGL_BAD_CONFIG 0x3005
41 #define EGL_BAD_CONTEXT 0x3006
42 #define EGL_BAD_CURRENT_SURFACE 0x3007
43 #define EGL_BAD_DISPLAY 0x3008
44 #define EGL_BAD_MATCH 0x3009
45 #define EGL_BAD_NATIVE_PIXMAP 0x300A
46 #define EGL_BAD_NATIVE_WINDOW 0x300B
47 #define EGL_BAD_PARAMETER 0x300C
48 #define EGL_BAD_SURFACE 0x300D
49 #define EGL_CONTEXT_LOST 0x300E
50 /* 0x300F - 0x301F reserved for additional errors. */
52 /*
53 ** Config attributes
54 */
55 #define EGL_BUFFER_SIZE 0x3020
56 #define EGL_ALPHA_SIZE 0x3021
57 #define EGL_BLUE_SIZE 0x3022
58 #define EGL_GREEN_SIZE 0x3023
59 #define EGL_RED_SIZE 0x3024
60 #define EGL_DEPTH_SIZE 0x3025
61 #define EGL_STENCIL_SIZE 0x3026
62 #define EGL_CONFIG_CAVEAT 0x3027
63 #define EGL_CONFIG_ID 0x3028
64 #define EGL_LEVEL 0x3029
65 #define EGL_MAX_PBUFFER_HEIGHT 0x302A
66 #define EGL_MAX_PBUFFER_PIXELS 0x302B
67 #define EGL_MAX_PBUFFER_WIDTH 0x302C
68 #define EGL_NATIVE_RENDERABLE 0x302D
69 #define EGL_NATIVE_VISUAL_ID 0x302E
70 #define EGL_NATIVE_VISUAL_TYPE 0x302F
71 /*#define EGL_PRESERVED_RESOURCES 0x3030*/
72 #define EGL_SAMPLES 0x3031
73 #define EGL_SAMPLE_BUFFERS 0x3032
74 #define EGL_SURFACE_TYPE 0x3033
75 #define EGL_TRANSPARENT_TYPE 0x3034
76 #define EGL_TRANSPARENT_BLUE_VALUE 0x3035
77 #define EGL_TRANSPARENT_GREEN_VALUE 0x3036
78 #define EGL_TRANSPARENT_RED_VALUE 0x3037
81 #define EGL_BIND_TO_TEXTURE_RGB 0x3039
82 #define EGL_BIND_TO_TEXTURE_RGBA 0x303A
83 #define EGL_MIN_SWAP_INTERVAL 0x303B
84 #define EGL_MAX_SWAP_INTERVAL 0x303C
86 /*
87 ** Config values
88 */
89 #define EGL_DONT_CARE ( (EGLint)-1 )
99 /*
100 ** Config attribute mask bits
101 */
106 /*
107 ** String names
108 */
109 #define EGL_VENDOR 0x3053
110 #define EGL_VERSION 0x3054
111 #define EGL_EXTENSIONS 0x3055
113 /*
114 ** Surface attributes
115 */
116 #define EGL_HEIGHT 0x3056
117 #define EGL_WIDTH 0x3057
118 #define EGL_LARGEST_PBUFFER 0x3058
124 /*
125 ** BindTexImage / ReleaseTexImage buffer target
126 */
127 #define EGL_BACK_BUFFER 0x3084
129 /*
130 ** Current surfaces
131 */
132 #define EGL_DRAW 0x3059
133 #define EGL_READ 0x305A
135 /*
136 ** Engines
137 */
138 #define EGL_CORE_NATIVE_ENGINE 0x305B
140 #ifdef __cplusplus
142 #endif
150 //#ifdef __cplusplus
151 //void (* eglGetProcAddress (const char *procname))(...);
152 //#else
154 //#endif
156 EGLBoolean eglGetConfigs( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config );
157 EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config );
158 EGLBoolean eglGetConfigAttrib( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value );
160 EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list );
161 EGLSurface eglCreatePixmapSurface( EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list );
162 EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list );
164 EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value );
165 /* EGL 1.1 render-to-texture APIs */
166 EGLBoolean eglSurfaceAttrib( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value );
170 /* EGL 1.1 swap control API */
173 EGLContext eglCreateContext( EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list );
186 #ifdef __cplusplus
187 }
188 #endif