3ec8a7577487333e02be651a8ada7d8bd0bc30a3
[mesa.git] / src / egl / main / eglconfig.h
1 #ifndef EGLCONFIG_INCLUDED
2 #define EGLCONFIG_INCLUDED
3
4
5 #include "egltypedefs.h"
6 #include "GL/internal/glcore.h"
7
8
9 #define MAX_ATTRIBS 100
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 __GLcontextModes glmode;
18 };
19
20
21
22 #define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB])
23
24
25 extern void
26 _eglInitConfig(_EGLConfig *config, EGLint id);
27
28
29 extern _EGLConfig *
30 _eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config);
31
32
33 extern _EGLConfig *
34 _eglAddConfig(_EGLDisplay *display, const _EGLConfig *config);
35
36
37 extern EGLBoolean
38 _eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list);
39
40
41 extern EGLBoolean
42 _eglConfigQualifies(const _EGLConfig *c, const _EGLConfig *min);
43
44
45 extern EGLint
46 _eglCompareConfigs(const _EGLConfig *a, const _EGLConfig *b);
47
48
49 extern EGLBoolean
50 _eglChooseConfig(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
51
52
53 extern EGLBoolean
54 _eglGetConfigAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
55
56
57 extern EGLBoolean
58 _eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
59
60
61 extern void
62 _eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val);
63
64 extern GLboolean
65 _eglFillInConfigs( _EGLConfig *configs,
66 GLenum fb_format, GLenum fb_type,
67 const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
68 unsigned num_depth_stencil_bits,
69 const GLenum * db_modes, unsigned num_db_modes,
70 int visType );
71
72 #endif /* EGLCONFIG_INCLUDED */