1/* GDK - The GIMP Drawing Kit
2 *
3 * gdkglcontext-wayland.h: Private Wayland specific OpenGL wrappers
4 *
5 * Copyright © 2014 Emmanuele Bassi
6 * Copyright © 2014 Red Hat, Int
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef __GDK_WAYLAND_GL_CONTEXT__
23#define __GDK_WAYLAND_GL_CONTEXT__
24
25#include "gdkglcontextprivate.h"
26#include "gdkdisplayprivate.h"
27#include "gdkvisual.h"
28#include "gdkwindow.h"
29#include "gdkinternals.h"
30#include "gdkmain.h"
31
32#include <epoxy/egl.h>
33
34G_BEGIN_DECLS
35
36struct _GdkWaylandGLContext
37{
38 GdkGLContext parent_instance;
39
40 EGLContext egl_context;
41 EGLConfig egl_config;
42 gboolean is_attached;
43};
44
45struct _GdkWaylandGLContextClass
46{
47 GdkGLContextClass parent_class;
48};
49
50gboolean gdk_wayland_display_init_gl (GdkDisplay *display);
51GdkGLContext * gdk_wayland_window_create_gl_context (GdkWindow *window,
52 gboolean attach,
53 GdkGLContext *share,
54 GError **error);
55void gdk_wayland_window_invalidate_for_new_frame (GdkWindow *window,
56 cairo_region_t *update_area);
57gboolean gdk_wayland_display_make_gl_context_current (GdkDisplay *display,
58 GdkGLContext *context);
59
60G_END_DECLS
61
62#endif /* __GDK_WAYLAND_GL_CONTEXT__ */
63