added EGL_OPENGL_API case
[mesa.git] / src / egl / main / eglglobals.h
1 #ifndef EGLGLOBALS_INCLUDED
2 #define EGLGLOBALS_INCLUDED
3
4 #include "egltypedefs.h"
5 #include "eglhash.h"
6
7
8 /**
9 * Per-thread info
10 */
11 struct _egl_thread_info
12 {
13 EGLint LastError;
14 _EGLContext *CurrentContext;
15 EGLenum CurrentAPI;
16 };
17
18
19 /**
20 * Global library data
21 */
22 struct _egl_global
23 {
24 EGLBoolean Initialized;
25
26 _EGLHashtable *Displays;
27 _EGLHashtable *Surfaces;
28
29 EGLScreenMESA FreeScreenHandle;
30
31 /* XXX these may be temporary */
32 EGLBoolean OpenGLAPISupported;
33 EGLBoolean OpenGLESAPISupported;
34 EGLBoolean OpenVGAPISupported;
35
36 /* XXX temporary - should be thread-specific data (TSD) */
37 _EGLThreadInfo *ThreadInfo;
38 };
39
40
41 extern struct _egl_global _eglGlobal;
42
43
44 extern void
45 _eglInitGlobals(void);
46
47
48 extern void
49 _eglDestroyGlobals(void);
50
51
52 extern _EGLThreadInfo *
53 _eglNewThreadInfo(void);
54
55
56 extern void
57 _eglDeleteThreadData(_EGLThreadInfo *t);
58
59
60 extern _EGLThreadInfo *
61 _eglGetCurrentThread(void);
62
63
64 extern void
65 _eglError(EGLint errCode, const char *msg);
66
67
68 #endif /* EGLGLOBALS_INCLUDED */