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
;
20 EGLint Type
; /* one of EGL_WINDOW_BIT, EGL_PIXMAP_BIT or EGL_PBUFFER_BIT */
22 EGLint TextureFormat
, TextureTarget
;
23 EGLint MipmapTexture
, MipmapLevel
;
26 /* If type == EGL_SCREEN_BIT: */
27 EGLint VisibleRefCount
; /* number of screens I'm displayed on */
29 #ifdef EGL_VERSION_1_2
30 EGLint SwapBehavior
; /* one of EGL_BUFFER_PRESERVED/DESTROYED */
31 EGLint HorizontalResolution
, VerticalResolution
;
33 EGLint RenderBuffer
; /* EGL_BACK_BUFFER or EGL_SINGLE_BUFFER */
34 EGLint AlphaFormat
; /* EGL_ALPHA_FORMAT_NONPRE or EGL_ALPHA_FORMAT_PRE */
35 EGLint Colorspace
; /* EGL_COLORSPACE_sRGB or EGL_COLORSPACE_LINEAR */
36 #endif /* EGL_VERSION_1_2 */
41 _eglInitSurface(_EGLDriver
*drv
, EGLDisplay dpy
,
42 _EGLSurface
*surf
, EGLint type
, EGLConfig config
,
43 const EGLint
*attrib_list
);
47 _eglSaveSurface(_EGLSurface
*surf
);
51 _eglRemoveSurface(_EGLSurface
*surf
);
55 _eglGetSurfaceHandle(_EGLSurface
*surface
);
59 _eglLookupSurface(EGLSurface surf
);
63 _eglGetCurrentSurface(EGLint readdraw
);
67 _eglSwapBuffers(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface draw
);
71 _eglCopyBuffers(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, NativePixmapType target
);
75 _eglQuerySurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint attribute
, EGLint
*value
);
79 _eglCreateWindowSurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLConfig config
, NativeWindowType window
, const EGLint
*attrib_list
);
83 _eglCreatePixmapSurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLConfig config
, NativePixmapType pixmap
, const EGLint
*attrib_list
);
87 _eglCreatePbufferSurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLConfig config
, const EGLint
*attrib_list
);
91 _eglDestroySurface(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
);
95 _eglSurfaceAttrib(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint attribute
, EGLint value
);
99 _eglBindTexImage(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint buffer
);
103 _eglReleaseTexImage(_EGLDriver
*drv
, EGLDisplay dpy
, EGLSurface surface
, EGLint buffer
);
107 _eglSwapInterval(_EGLDriver
*drv
, EGLDisplay dpy
, EGLint interval
);
110 #ifdef EGL_VERSION_1_2
113 _eglCreatePbufferFromClientBuffer(_EGLDriver
*drv
, EGLDisplay dpy
,
114 EGLenum buftype
, EGLClientBuffer buffer
,
115 EGLConfig config
, const EGLint
*attrib_list
);
117 #endif /* EGL_VERSION_1_2 */
121 #endif /* EGLSURFACE_INCLUDED */