diff --git a/gdk/quartz/Makefile.am b/gdk/quartz/Makefile.am index 2c8fb90e6a..8954849a62 100644 --- a/gdk/quartz/Makefile.am +++ b/gdk/quartz/Makefile.am @@ -33,6 +33,8 @@ libgdk_quartz_la_SOURCES = \ gdkdnd-quartz.h \ gdkevents-quartz.c \ gdkeventloop-quartz.c \ + gdkglcontext-quartz.c \ + gdkglcontext-quartz.h \ gdkglobals-quartz.c \ gdkkeys-quartz.c \ gdkprivate-quartz.h \ diff --git a/gdk/quartz/gdkglcontext-quartz.c b/gdk/quartz/gdkglcontext-quartz.c new file mode 100644 index 0000000000..a6cc3b6a35 --- /dev/null +++ b/gdk/quartz/gdkglcontext-quartz.c @@ -0,0 +1,39 @@ +/* GDK - The GIMP Drawing Kit + * + * gdkglcontext-quartz.c: Quartz specific OpenGL wrappers + * + * Copyright © 2014 Emmanuele Bassi + * Copyright © 2014 Alexander Larsson + * Copyright © 2014 Brion Vibber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library. If not, see . + */ + +#include "config.h" + +#include "gdkglcontext-quartz.h" + +#include "gdkintl.h" + +GdkGLContext * +gdk_quartz_window_create_gl_context (GdkWindow *window, + gboolean attached, + GdkGLContext *share, + GError **error) +{ + /* FIXME: implement */ + g_set_error_literal (error, GDK_GL_ERROR, GDK_GL_ERROR_NOT_AVAILABLE, + _("Not implemented on OS X")); + return NULL; +} diff --git a/gdk/quartz/gdkglcontext-quartz.h b/gdk/quartz/gdkglcontext-quartz.h new file mode 100644 index 0000000000..bc55a57032 --- /dev/null +++ b/gdk/quartz/gdkglcontext-quartz.h @@ -0,0 +1,41 @@ +/* GDK - The GIMP Drawing Kit + * + * gdkglcontext-quartz.h: Private Quartz specific OpenGL wrappers + * + * Copyright © 2014 Emmanuele Bassi + * Copyright © 2014 Red Hat, Int + * Copyright © 2014 Brion Vibber + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library. If not, see . + */ + +#ifndef __GDK_QUARTZ_GL_CONTEXT__ +#define __GDK_QUARTZ_GL_CONTEXT__ + +#include "gdkglcontextprivate.h" +#include "gdkvisual.h" +#include "gdkwindow.h" +#include "gdkinternals.h" +#include "gdkmain.h" + +G_BEGIN_DECLS + +GdkGLContext * gdk_quartz_window_create_gl_context (GdkWindow *window, + gboolean attach, + GdkGLContext *share, + GError **error); + +G_END_DECLS + +#endif /* __GDK_QUARTZ_GL_CONTEXT__ */ diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index 6306034bce..b77be34f31 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -25,6 +25,7 @@ #include "gdkwindowimpl.h" #include "gdkprivate-quartz.h" +#include "gdkglcontext-quartz.h" #include "gdkquartzscreen.h" #include "gdkquartzcursor.h" @@ -2944,6 +2945,7 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass) impl_class->change_property = _gdk_quartz_window_change_property; impl_class->delete_property = _gdk_quartz_window_delete_property; + impl_class->create_gl_context = gdk_quartz_window_create_gl_context; impl_quartz_class->get_context = gdk_window_impl_quartz_get_context; impl_quartz_class->release_context = gdk_window_impl_quartz_release_context;