2011-02-24 19:31:41 -05:00
|
|
|
/*
|
|
|
|
* Cogl
|
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* A Low Level GPU Graphics and Utilities API
|
2011-02-24 19:31:41 -05:00
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use, copy,
|
|
|
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
2011-02-24 19:31:41 -05:00
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* This can be included multiple times with different definitions for
|
|
|
|
* the COGL_WINSYS_FEATURE_* functions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Macro prototypes:
|
|
|
|
* COGL_WINSYS_FEATURE_BEGIN (name, namespaces, extension_names,
|
2011-05-24 12:21:28 -04:00
|
|
|
* implied_private_egl_feature_flags)
|
2011-02-24 19:31:41 -05:00
|
|
|
* COGL_WINSYS_FEATURE_FUNCTION (return_type, function_name,
|
|
|
|
* (arguments))
|
|
|
|
* ...
|
|
|
|
* COGL_WINSYS_FEATURE_END ()
|
|
|
|
*
|
|
|
|
* Note: You can list multiple namespace and extension names if the
|
|
|
|
* corresponding _FEATURE_FUNCTIONS have the same semantics accross
|
|
|
|
* the different extension variants.
|
|
|
|
*
|
|
|
|
* XXX: NB: Don't add a trailing semicolon when using these macros
|
|
|
|
*/
|
|
|
|
|
|
|
|
COGL_WINSYS_FEATURE_BEGIN (swap_region,
|
|
|
|
"NOK\0",
|
|
|
|
"swap_region\0",
|
2011-05-24 12:21:28 -04:00
|
|
|
COGL_EGL_WINSYS_FEATURE_SWAP_REGION)
|
2011-02-24 19:31:41 -05:00
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglSwapBuffersRegion,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLSurface surface,
|
|
|
|
EGLint numRects,
|
|
|
|
const EGLint *rects))
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
2011-05-24 17:34:10 -04:00
|
|
|
/* XXX: These macros can't handle falling back to looking for
|
|
|
|
* EGL_KHR_image if EGL_KHR_image_base and EGL_KHR_image_pixmap aren't
|
|
|
|
* found... */
|
2011-07-24 12:54:16 -04:00
|
|
|
#ifdef EGL_KHR_image_base
|
2011-05-24 17:34:10 -04:00
|
|
|
COGL_WINSYS_FEATURE_BEGIN (image_base,
|
|
|
|
"KHR\0",
|
|
|
|
"image_base\0",
|
|
|
|
0)
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLImageKHR, eglCreateImage,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLContext ctx,
|
|
|
|
EGLenum target,
|
|
|
|
EGLClientBuffer buffer,
|
|
|
|
const EGLint *attrib_list))
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglDestroyImage,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLImageKHR image))
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
2011-07-24 12:54:16 -04:00
|
|
|
#endif
|
2011-05-24 18:15:37 -04:00
|
|
|
COGL_WINSYS_FEATURE_BEGIN (image_pixmap,
|
|
|
|
"KHR\0",
|
|
|
|
"image_pixmap\0",
|
|
|
|
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_X11_PIXMAP)
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
2011-12-01 17:52:59 -05:00
|
|
|
#ifdef EGL_WL_bind_wayland_display
|
2011-05-24 20:37:56 -04:00
|
|
|
COGL_WINSYS_FEATURE_BEGIN (bind_wayland_display,
|
|
|
|
"WL\0",
|
|
|
|
"bind_wayland_display\0",
|
|
|
|
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_WAYLAND_BUFFER)
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLImageKHR, eglBindWaylandDisplay,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
struct wl_display *wayland_display))
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglUnbindWaylandDisplay,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
struct wl_display *wayland_display))
|
2013-04-30 09:09:11 -04:00
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglQueryWaylandBuffer,
|
|
|
|
(EGLDisplay dpy,
|
2013-10-15 14:02:46 -04:00
|
|
|
struct wl_resource *buffer,
|
2013-04-30 09:09:11 -04:00
|
|
|
EGLint attribute, EGLint *value))
|
2011-05-24 20:37:56 -04:00
|
|
|
COGL_WINSYS_FEATURE_END ()
|
2014-03-14 09:33:07 -04:00
|
|
|
#endif /* EGL_WL_bind_wayland_display */
|
2012-09-26 15:32:36 -04:00
|
|
|
|
|
|
|
COGL_WINSYS_FEATURE_BEGIN (create_context,
|
|
|
|
"KHR\0",
|
|
|
|
"create_context\0",
|
|
|
|
COGL_EGL_WINSYS_FEATURE_CREATE_CONTEXT)
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
|
|
|
|
2013-01-22 16:21:33 -05:00
|
|
|
COGL_WINSYS_FEATURE_BEGIN (buffer_age,
|
|
|
|
"EXT\0",
|
|
|
|
"buffer_age\0",
|
|
|
|
COGL_EGL_WINSYS_FEATURE_BUFFER_AGE)
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
|
|
|
|
2012-02-07 12:59:51 -05:00
|
|
|
COGL_WINSYS_FEATURE_BEGIN (swap_buffers_with_damage,
|
|
|
|
"EXT\0",
|
|
|
|
"swap_buffers_with_damage\0",
|
|
|
|
0)
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglSwapBuffersWithDamage,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLSurface surface,
|
|
|
|
const EGLint *rects,
|
|
|
|
EGLint n_rects))
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
2013-01-10 20:13:34 -05:00
|
|
|
|
|
|
|
#if defined(EGL_KHR_fence_sync) || defined(EGL_KHR_reusable_sync)
|
|
|
|
COGL_WINSYS_FEATURE_BEGIN (fence_sync,
|
|
|
|
"KHR\0",
|
|
|
|
"fence_sync\0",
|
|
|
|
COGL_EGL_WINSYS_FEATURE_FENCE_SYNC)
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLSyncKHR, eglCreateSync,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLenum type,
|
|
|
|
const EGLint *attrib_list))
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLint, eglClientWaitSync,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLSyncKHR sync,
|
|
|
|
EGLint flags,
|
|
|
|
EGLTimeKHR timeout))
|
|
|
|
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglDestroySync,
|
|
|
|
(EGLDisplay dpy,
|
|
|
|
EGLSyncKHR sync))
|
|
|
|
COGL_WINSYS_FEATURE_END ()
|
|
|
|
#endif
|