Merge branch 'mesa_7_5_branch'
[mesa.git] / src / egl / main / eglconfig.h
1 #ifndef EGLCONFIG_INCLUDED
2 #define EGLCONFIG_INCLUDED
3
4
5 #include "egltypedefs.h"
6 #include <GLES/gl.h>
7
8
9 #define MAX_ATTRIBS 128
10 #define FIRST_ATTRIB EGL_BUFFER_SIZE
11
12
13 struct _egl_config
14 {
15 EGLConfig Handle; /* the public/opaque handle which names this config */
16 EGLint Attrib[MAX_ATTRIBS];
17 };
18
19
20 #define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) \
21 assert((ATTR) - FIRST_ATTRIB < MAX_ATTRIBS); \
22 ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
23
24
25 #define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB])
26
27
28 extern void
29 _eglInitConfig(_EGLConfig *config, EGLint id);
30
31
32 extern EGLConfig
33 _eglGetConfigHandle(_EGLConfig *config);
34
35
36 extern _EGLConfig *
37 _eglLookupConfig(EGLConfig config, _EGLDisplay *dpy);
38
39
40 extern _EGLConfig *
41 _eglAddConfig(_EGLDisplay *display, _EGLConfig *config);
42
43
44 extern EGLBoolean
45 _eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list);
46
47
48 extern EGLBoolean
49 _eglChooseConfig(_EGLDriver *drv, _EGLDisplay *dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
50
51
52 extern EGLBoolean
53 _eglGetConfigAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, EGLint attribute, EGLint *value);
54
55
56 extern EGLBoolean
57 _eglGetConfigs(_EGLDriver *drv, _EGLDisplay *dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
58
59
60 extern void
61 _eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val);
62
63
64 #endif /* EGLCONFIG_INCLUDED */