Merge commit 'origin/gallium-master-merge'
[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 _EGLDisplay *Display; /* who do I belong to? */
15
16 _EGLConfig *Config;
17
18 _EGLSurface *DrawSurface;
19 _EGLSurface *ReadSurface;
20
21 EGLBoolean IsBound;
22 EGLBoolean DeletePending;
23
24 EGLint ClientAPI; /**< EGL_OPENGL_ES_API, EGL_OPENGL_API, EGL_OPENVG_API */
25 EGLint ClientVersion; /**< 1 = OpenGLES 1.x, 2 = OpenGLES 2.x */
26 };
27
28
29 extern EGLBoolean
30 _eglInitContext(_EGLDriver *drv, EGLDisplay dpy, _EGLContext *ctx,
31 EGLConfig config, const EGLint *attrib_list);
32
33
34 extern void
35 _eglSaveContext(_EGLContext *ctx);
36
37
38 extern void
39 _eglRemoveContext(_EGLContext *ctx);
40
41
42 extern EGLContext
43 _eglGetContextHandle(_EGLContext *ctx);
44
45
46 extern _EGLContext *
47 _eglLookupContext(EGLContext ctx);
48
49
50 extern _EGLContext *
51 _eglGetCurrentContext(void);
52
53
54 extern EGLContext
55 _eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
56
57
58 extern EGLBoolean
59 _eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx);
60
61
62 extern EGLBoolean
63 _eglQueryContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
64
65
66 extern EGLBoolean
67 _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
68
69
70 extern EGLBoolean
71 _eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
72
73 #endif /* EGLCONTEXT_INCLUDED */