some initial EGL 1.2 work
[mesa.git] / src / egl / main / eglcontext.h
1
2 #ifndef EGLCONTEXT_INCLUDED
3 #define EGLCONTEXT_INCLUDED
4
5
6 #include "egltypedefs.h"
7
8
9 /**
10 * "Base" class for device driver contexts.
11 */
12 struct _egl_context
13 {
14 EGLContext Handle; /* The public/opaque handle which names this object */
15
16 _EGLDisplay *Display; /* who do I belong to? */
17
18 _EGLConfig *Config;
19
20 _EGLSurface *DrawSurface;
21 _EGLSurface *ReadSurface;
22
23 EGLBoolean IsBound;
24 EGLBoolean DeletePending;
25 #ifdef EGL_VERSION_1_2
26 EGLint ClientAPI; /* Either EGL_OPENGL_ES_API or EGL_OPENVG_API */
27 #endif /* EGL_VERSION_1_2 */
28 };
29
30
31 extern EGLBoolean
32 _eglInitContext(_EGLDriver *drv, EGLDisplay dpy, _EGLContext *ctx,
33 EGLConfig config, const EGLint *attrib_list);
34
35
36 extern void
37 _eglSaveContext(_EGLContext *ctx);
38
39
40 extern void
41 _eglRemoveContext(_EGLContext *ctx);
42
43
44 extern _EGLContext *
45 _eglLookupContext(EGLContext ctx);
46
47
48 extern _EGLContext *
49 _eglGetCurrentContext(void);
50
51
52 extern EGLContext
53 _eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
54
55
56 extern EGLBoolean
57 _eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx);
58
59
60 extern EGLBoolean
61 _eglQueryContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
62
63
64 extern EGLBoolean
65 _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
66
67
68 extern EGLBoolean
69 _eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
70
71 #endif /* EGLCONTEXT_INCLUDED */