• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2016 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // functionsegl_typedefs.h: Typedefs of EGL functions.
8 
9 #ifndef LIBANGLE_RENDERER_GL_EGL_FUNCTIONSEGLTYPEDEFS_H_
10 #define LIBANGLE_RENDERER_GL_EGL_FUNCTIONSEGLTYPEDEFS_H_
11 
12 #include <EGL/egl.h>
13 
14 namespace rx
15 {
16 // EGL 1.0
17 typedef EGLBoolean (*PFNEGLCHOOSECONFIGPROC)(EGLDisplay dpy,
18                                              const EGLint *attrib_list,
19                                              EGLConfig *configs,
20                                              EGLint config_size,
21                                              EGLint *num_config);
22 typedef EGLBoolean (*PFNEGLCOPYBUFFERSPROC)(EGLDisplay dpy,
23                                             EGLSurface surface,
24                                             EGLNativePixmapType target);
25 typedef EGLContext (*PFNEGLCREATECONTEXTPROC)(EGLDisplay dpy,
26                                               EGLConfig config,
27                                               EGLContext share_context,
28                                               const EGLint *attrib_list);
29 typedef EGLSurface (*PFNEGLCREATEPBUFFERSURFACEPROC)(EGLDisplay dpy,
30                                                      EGLConfig config,
31                                                      const EGLint *attrib_list);
32 typedef EGLSurface (*PFNEGLCREATEPIXMAPSURFACEPROC)(EGLDisplay dpy,
33                                                     EGLConfig config,
34                                                     EGLNativePixmapType pixmap,
35                                                     const EGLint *attrib_list);
36 typedef EGLSurface (*PFNEGLCREATEWINDOWSURFACEPROC)(EGLDisplay dpy,
37                                                     EGLConfig config,
38                                                     EGLNativeWindowType win,
39                                                     const EGLint *attrib_list);
40 typedef EGLBoolean (*PFNEGLDESTROYCONTEXTPROC)(EGLDisplay dpy, EGLContext ctx);
41 typedef EGLBoolean (*PFNEGLDESTROYSURFACEPROC)(EGLDisplay dpy, EGLSurface surface);
42 typedef EGLBoolean (*PFNEGLGETCONFIGATTRIBPROC)(EGLDisplay dpy,
43                                                 EGLConfig config,
44                                                 EGLint attribute,
45                                                 EGLint *value);
46 typedef EGLBoolean (*PFNEGLGETCONFIGSPROC)(EGLDisplay dpy,
47                                            EGLConfig *configs,
48                                            EGLint config_size,
49                                            EGLint *num_config);
50 typedef EGLDisplay (*PFNEGLGETCURRENTDISPLAYPROC)(void);
51 typedef EGLSurface (*PFNEGLGETCURRENTSURFACEPROC)(EGLint readdraw);
52 typedef EGLDisplay (*PFNEGLGETDISPLAYPROC)(EGLNativeDisplayType display_id);
53 typedef EGLint (*PFNEGLGETERRORPROC)(void);
54 typedef __eglMustCastToProperFunctionPointerType (*PFNEGLGETPROCADDRESSPROC)(const char *procname);
55 typedef EGLBoolean (*PFNEGLINITIALIZEPROC)(EGLDisplay dpy, EGLint *major, EGLint *minor);
56 typedef EGLBoolean (*PFNEGLMAKECURRENTPROC)(EGLDisplay dpy,
57                                             EGLSurface draw,
58                                             EGLSurface read,
59                                             EGLContext ctx);
60 typedef EGLBoolean (*PFNEGLQUERYCONTEXTPROC)(EGLDisplay dpy,
61                                              EGLContext ctx,
62                                              EGLint attribute,
63                                              EGLint *value);
64 typedef const char *(*PFNEGLQUERYSTRINGPROC)(EGLDisplay dpy, EGLint name);
65 typedef EGLBoolean (*PFNEGLQUERYSURFACEPROC)(EGLDisplay dpy,
66                                              EGLSurface surface,
67                                              EGLint attribute,
68                                              EGLint *value);
69 typedef EGLBoolean (*PFNEGLSWAPBUFFERSPROC)(EGLDisplay dpy, EGLSurface surface);
70 typedef EGLBoolean (*PFNEGLTERMINATEPROC)(EGLDisplay dpy);
71 typedef EGLBoolean (*PFNEGLWAITGLPROC)(void);
72 typedef EGLBoolean (*PFNEGLWAITNATIVEPROC)(EGLint engine);
73 
74 // EGL 1.1
75 typedef EGLBoolean (*PFNEGLBINDTEXIMAGEPROC)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
76 typedef EGLBoolean (*PFNEGLRELEASETEXIMAGEPROC)(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
77 typedef EGLBoolean (*PFNEGLSURFACEATTRIBPROC)(EGLDisplay dpy,
78                                               EGLSurface surface,
79                                               EGLint attribute,
80                                               EGLint value);
81 typedef EGLBoolean (*PFNEGLSWAPINTERVALPROC)(EGLDisplay dpy, EGLint interval);
82 
83 // EGL 1.2
84 typedef EGLBoolean (*PFNEGLBINDAPIPROC)(EGLenum api);
85 typedef EGLenum (*PFNEGLQUERYAPIPROC)(void);
86 typedef EGLSurface (*PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC)(EGLDisplay dpy,
87                                                               EGLenum buftype,
88                                                               EGLClientBuffer buffer,
89                                                               EGLConfig config,
90                                                               const EGLint *attrib_list);
91 typedef EGLBoolean (*PFNEGLRELEASETHREADPROC)(void);
92 typedef EGLBoolean (*PFNEGLWAITCLIENTPROC)(void);
93 
94 // EGL 1.3
95 
96 // EGL 1.4
97 typedef EGLContext (*PFNEGLGETCURRENTCONTEXTPROC)(void);
98 
99 // EGL 1.5
100 typedef EGLSync (*PFNEGLCREATESYNCPROC)(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
101 typedef EGLBoolean (*PFNEGLDESTROYSYNCPROC)(EGLDisplay dpy, EGLSync sync);
102 typedef EGLint (*PFNEGLCLIENTWAITSYNCPROC)(EGLDisplay dpy,
103                                            EGLSync sync,
104                                            EGLint flags,
105                                            EGLTime timeout);
106 typedef EGLBoolean (*PFNEGLGETSYNCATTRIBPROC)(EGLDisplay dpy,
107                                               EGLSync sync,
108                                               EGLint attribute,
109                                               EGLAttrib *value);
110 typedef EGLImage (*PFNEGLCREATEIMAGEPROC)(EGLDisplay dpy,
111                                           EGLContext ctx,
112                                           EGLenum target,
113                                           EGLClientBuffer buffer,
114                                           const EGLAttrib *attrib_list);
115 typedef EGLBoolean (*PFNEGLDESTROYIMAGEPROC)(EGLDisplay dpy, EGLImage image);
116 typedef EGLDisplay (*PFNEGLGETPLATFORMDISPLAYPROC)(EGLenum platform,
117                                                    void *native_display,
118                                                    const EGLAttrib *attrib_list);
119 typedef EGLSurface (*PFNEGLCREATEPLATFORMWINDOWSURFACEPROC)(EGLDisplay dpy,
120                                                             EGLConfig config,
121                                                             void *native_window,
122                                                             const EGLAttrib *attrib_list);
123 typedef EGLSurface (*PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC)(EGLDisplay dpy,
124                                                             EGLConfig config,
125                                                             void *native_pixmap,
126                                                             const EGLAttrib *attrib_list);
127 typedef EGLBoolean (*PFNEGLWAITSYNCPROC)(EGLDisplay dpy, EGLSync sync, EGLint flags);
128 
129 }  // namespace rx
130 
131 #endif  // LIBANGLE_RENDERER_GL_EGL_FUNCTIONSEGLTYPEDEFS_H_
132