2 #ifndef EGLCONTEXT_INCLUDED
3 #define EGLCONTEXT_INCLUDED
6 #include "egltypedefs.h"
10 * "Base" class for device driver contexts.
14 /* Managed by EGLDisplay for linking */
18 /* The bound status of the context */
19 _EGLThreadInfo
*Binding
;
20 _EGLSurface
*DrawSurface
;
21 _EGLSurface
*ReadSurface
;
25 EGLint ClientAPI
; /**< EGL_OPENGL_ES_API, EGL_OPENGL_API, EGL_OPENVG_API */
26 EGLint ClientVersion
; /**< 1 = OpenGLES 1.x, 2 = OpenGLES 2.x */
28 /* The real render buffer when a window surface is bound */
29 EGLint WindowRenderBuffer
;
34 _eglInitContext(_EGLDriver
*drv
, _EGLContext
*ctx
,
35 _EGLConfig
*config
, const EGLint
*attrib_list
);
39 _eglCreateContext(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLConfig
*conf
, _EGLContext
*share_list
, const EGLint
*attrib_list
);
43 _eglDestroyContext(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLContext
*ctx
);
47 _eglQueryContext(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLContext
*ctx
, EGLint attribute
, EGLint
*value
);
51 _eglMakeCurrent(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLSurface
*draw
, _EGLSurface
*read
, _EGLContext
*ctx
);
55 _eglCopyContextMESA(_EGLDriver
*drv
, EGLDisplay dpy
, EGLContext source
, EGLContext dest
, EGLint mask
);
59 * Return true if the context is bound to a thread.
61 static INLINE EGLBoolean
62 _eglIsContextBound(_EGLContext
*ctx
)
64 return (ctx
->Binding
!= NULL
);
68 #endif /* EGLCONTEXT_INCLUDED */