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 */
31 _eglInitContext(_EGLDriver
*drv
, _EGLContext
*ctx
,
32 _EGLConfig
*config
, const EGLint
*attrib_list
);
36 _eglCreateContext(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLConfig
*conf
, _EGLContext
*share_list
, const EGLint
*attrib_list
);
40 _eglDestroyContext(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLContext
*ctx
);
44 _eglQueryContext(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLContext
*ctx
, EGLint attribute
, EGLint
*value
);
48 _eglMakeCurrent(_EGLDriver
*drv
, _EGLDisplay
*dpy
, _EGLSurface
*draw
, _EGLSurface
*read
, _EGLContext
*ctx
);
52 _eglCopyContextMESA(_EGLDriver
*drv
, EGLDisplay dpy
, EGLContext source
, EGLContext dest
, EGLint mask
);
56 * Return true if the context is bound to a thread.
58 static INLINE EGLBoolean
59 _eglIsContextBound(_EGLContext
*ctx
)
61 return (ctx
->Binding
!= NULL
);
65 #endif /* EGLCONTEXT_INCLUDED */