1 #ifndef EGLSURFACE_INCLUDED
2 #define EGLSURFACE_INCLUDED
5 #include "egltypedefs.h"
9 * "Base" class for device driver surfaces.
13 EGLSurface Handle
; /* The public/opaque handle which names this object */
16 /* May need reference counting here */
18 EGLBoolean DeletePending
;
19 EGLBoolean BoundToTexture
;
21 EGLint Type
; /* one of EGL_WINDOW_BIT, EGL_PIXMAP_BIT or EGL_PBUFFER_BIT */
23 EGLint TextureFormat
, TextureTarget
;
24 EGLint MipmapTexture
, MipmapLevel
;
27 /* If type == EGL_SCREEN_BIT: */
28 EGLint VisibleRefCount
; /* number of screens I'm displayed on */
30 #ifdef EGL_VERSION_1_2
31 EGLint SwapBehavior
; /* one of EGL_BUFFER_PRESERVED/DESTROYED */
32 EGLint HorizontalResolution
, VerticalResolution
;
34 EGLint RenderBuffer
; /* EGL_BACK_BUFFER or EGL_SINGLE_BUFFER */
35 EGLint AlphaFormat
; /* EGL_ALPHA_FORMAT_NONPRE or EGL_ALPHA_FORMAT_PRE */
36 EGLint Colorspace
; /* EGL_COLORSPACE_sRGB or EGL_COLORSPACE_LINEAR */
37 #endif /* EGL_VERSION_1_2 */
42 _eglInitSurface(_EGLDriver
*drv
, EGLDisplay dpy
,
43 _EGLSurface
*surf
, EGLint type
, EGLConfig config
,
44 const EGLint
*attrib_list
);
48 _eglSaveSurface(_EGLSurface
*surf
);
52 _eglRemoveSurface(_EGLSurface
*surf
);
56 _eglGetSurfaceHandle(_EGLSurface
*surface
);
60 _eglLookupSurface(EGLSurface surf
);
64 _eglGetCurrentSurface(EGLint readdraw
);
68 _eglSwapBuffers(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface draw
);
72 _eglCopyBuffers(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, NativePixmapType target
);
76 _eglQuerySurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint attribute
, EGLint
*value
);
80 _eglCreateWindowSurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLConfig config
, NativeWindowType window
, const EGLint
*attrib_list
);
84 _eglCreatePixmapSurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLConfig config
, NativePixmapType pixmap
, const EGLint
*attrib_list
);
88 _eglCreatePbufferSurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLConfig config
, const EGLint
*attrib_list
);
92 _eglDestroySurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
);
96 _eglSurfaceAttrib(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint attribute
, EGLint value
);
100 _eglBindTexImage(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint buffer
);
104 _eglReleaseTexImage(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint buffer
);
108 _eglSwapInterval(_EGLDriver
*drv
, EGLDisplay dpy
, EGLint interval
);
111 #ifdef EGL_VERSION_1_2
114 _eglCreatePbufferFromClientBuffer(_EGLDriver
*drv
, EGLDisplay dpy
,
115 EGLenum buftype
, EGLClientBuffer buffer
,
116 EGLConfig config
, const EGLint
*attrib_list
);
118 #endif /* EGL_VERSION_1_2 */
122 #endif /* EGLSURFACE_INCLUDED */