aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglconfig.h
blob: 4a8061298054254f2d47d57db48ffea19cc5c464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef EGLCONFIG_INCLUDED
#define EGLCONFIG_INCLUDED


#include "egltypedefs.h"
#if 0
#include "GL/internal/glcore.h"
#endif


#define MAX_ATTRIBS 100
#define FIRST_ATTRIB EGL_BUFFER_SIZE


struct _egl_config
{
   EGLConfig Handle;   /* the public/opaque handle which names this config */
   EGLint Attrib[MAX_ATTRIBS];
};


#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
#define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB])


extern void
_eglInitConfig(_EGLConfig *config, EGLint id);


extern EGLConfig
_eglGetConfigHandle(_EGLConfig *config);


extern _EGLConfig *
_eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config);


extern _EGLConfig *
_eglAddConfig(_EGLDisplay *display, const _EGLConfig *config);


extern EGLBoolean
_eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list);


extern EGLBoolean
_eglChooseConfig(_EGLDriver *drv, EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);


extern EGLBoolean
_eglGetConfigAttrib(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);


extern EGLBoolean
_eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);


extern void
_eglSetConfigAttrib(_EGLConfig *config, EGLint attr, EGLint val);

#if 0
extern EGLBoolean
_eglFillInConfigs( _EGLConfig *configs,
                   EGLenum fb_format, EGLenum fb_type,
                   const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
                   unsigned num_depth_stencil_bits,
                   const EGLenum * db_modes, unsigned num_db_modes,
                   int visType );
#endif

#if 0
extern void
_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode);
#endif


#endif /* EGLCONFIG_INCLUDED */