[gtkglarea/jjardon/namespace_change: 2/4] gtkglglarea: Change namespace from gdk_gl_context to ggl_context
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkglarea/jjardon/namespace_change: 2/4] gtkglglarea: Change namespace from gdk_gl_context to ggl_context
- Date: Wed, 26 Mar 2014 21:08:02 +0000 (UTC)
commit 8c31d4f92e6a4e9f012dc6ac0ae523f996d48791
Author: Javier Jardón <jjardon gnome org>
Date: Wed Mar 26 20:03:41 2014 +0000
gtkglglarea: Change namespace from gdk_gl_context to ggl_context
gtkglarea is overloading the GDK and GTK namespaces; this means that
if we get a GdkGLContext in GTK+ in the future, and people link
gtkglarea with gtk, they'll have a bad time
gtkgl/gdkgl.c | 120 ++++++++++++++++++++++++++--------------------------
gtkgl/gdkgl.h | 96 +++++++++++++++++++++---------------------
gtkgl/gtkgl.def | 28 ++++++------
gtkgl/gtkglarea.c | 18 ++++----
gtkgl/gtkglarea.h | 2 +-
5 files changed, 132 insertions(+), 132 deletions(-)
---
diff --git a/gtkgl/gdkgl.c b/gtkgl/gdkgl.c
index 12cf393..c1765e8 100644
--- a/gtkgl/gdkgl.c
+++ b/gtkgl/gdkgl.c
@@ -40,16 +40,16 @@
#endif
/*
- * The GdkGLContext class
+ * The GglaContext class
*/
-struct _GdkGLContext {
+struct _GglaContext {
GObject parent;
#if defined GDK_WINDOWING_WIN32
gboolean initialised;
HGLRC hglrc;
HDC hdc;
HWND hwnd;
- GdkGLContext *share;
+ GglaContext *share;
PIXELFORMATDESCRIPTOR pfd;
#elif defined GDK_WINDOWING_X11
Display *xdisplay;
@@ -57,10 +57,10 @@ struct _GdkGLContext {
#endif
};
-struct _GdkGLContextClass {
+struct _GglaContextClass {
GObjectClass parent_class;
};
-typedef struct _GdkGLContextClass GdkGLContextClass;
+typedef struct _GglaContextClass GglaContextClass;
/*
* Local helper functions
@@ -76,7 +76,7 @@ static XVisualInfo *get_xvisualinfo(GdkVisual *visual);
* Generic GL support
*/
-gint gdk_gl_query(void)
+gint ggla_query(void)
{
#if defined GDK_WINDOWING_WIN32
return TRUE;
@@ -88,7 +88,7 @@ gint gdk_gl_query(void)
}
-gchar *gdk_gl_get_info()
+gchar *ggla_get_info()
{
char const *vendor, *version, *extensions;
#if defined GDK_WINDOWING_WIN32
@@ -109,7 +109,7 @@ gchar *gdk_gl_get_info()
}
-GdkVisual *gdk_gl_choose_visual(int *attrlist)
+GdkVisual *ggla_choose_visual(int *attrlist)
{
#if defined GDK_WINDOWING_WIN32
return gdk_visual_get_system ();
@@ -130,13 +130,13 @@ GdkVisual *gdk_gl_choose_visual(int *attrlist)
XFree(vi);
return visual;
#else
- g_warning ("gdk_gl_choose_visual not implemented on " PLATFORM);
+ g_warning ("ggla_choose_visual not implemented on " PLATFORM);
return NULL;
#endif
}
-int gdk_gl_get_config(GdkVisual *visual, int attrib)
+int ggla_get_config(GdkVisual *visual, int attrib)
{
#if defined GDK_WINDOWING_X11
Display *dpy;
@@ -157,7 +157,7 @@ int gdk_gl_get_config(GdkVisual *visual, int attrib)
XFree(vi);
return -1;
#else
- g_warning ("gdk_gl_get_config not implemented on " PLATFORM);
+ g_warning ("ggla_get_config not implemented on " PLATFORM);
return 0;
#endif
}
@@ -167,14 +167,14 @@ int gdk_gl_get_config(GdkVisual *visual, int attrib)
* GL context support
*/
-G_DEFINE_TYPE (GdkGLContext, gdk_gl_context, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GglaContext, ggla_context, G_TYPE_OBJECT)
static void
-gdk_gl_context_finalize(GObject *object)
+ggla_context_finalize(GObject *object)
{
- GdkGLContext *context;
+ GglaContext *context;
- context = GDK_GL_CONTEXT(object);
+ context = GGLA_CONTEXT(object);
#if defined GDK_WINDOWING_WIN32
if (context->hglrc == wglGetCurrentContext ())
@@ -196,57 +196,57 @@ gdk_gl_context_finalize(GObject *object)
context->glxcontext = NULL;
#endif
- G_OBJECT_CLASS (gdk_gl_context_parent_class)->finalize (object);
+ G_OBJECT_CLASS (ggla_context_parent_class)->finalize (object);
}
static void
-gdk_gl_context_class_init(GdkGLContextClass *class)
+ggla_context_class_init(GglaContextClass *class)
{
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS(class);
- gobject_class->finalize = gdk_gl_context_finalize;
+ gobject_class->finalize = ggla_context_finalize;
}
static void
-gdk_gl_context_init (GdkGLContext *gl_context)
+ggla_context_init (GglaContext *gl_context)
{
}
-GdkGLContext *
-gdk_gl_context_new(GdkVisual *visual)
+GglaContext *
+ggla_context_new(GdkVisual *visual)
{
#if defined GDK_WINDOWING_WIN32 || defined GDK_WINDOWING_X11
- return gdk_gl_context_share_new(visual, NULL, FALSE);
+ return ggla_context_share_new(visual, NULL, FALSE);
#else
- g_warning ("gdk_gl_context_new not implemented on " PLATFORM);
+ g_warning ("ggla_context_new not implemented on " PLATFORM);
return NULL;
#endif
}
-GdkGLContext *
-gdk_gl_context_share_new(GdkVisual *visual, GdkGLContext *sharelist, gint direct)
+GglaContext *
+ggla_context_share_new(GdkVisual *visual, GglaContext *sharelist, gint direct)
{
#if defined GDK_WINDOWING_WIN32
- GdkGLContext *context;
+ GglaContext *context;
#elif defined GDK_WINDOWING_X11
Display *dpy;
XVisualInfo *vi;
GLXContext glxcontext;
- GdkGLContext *context;
+ GglaContext *context;
#else
- g_warning ("gdk_gl_context_share_new not implemented on " PLATFORM);
+ g_warning ("ggla_context_share_new not implemented on " PLATFORM);
return NULL;
#endif
g_return_val_if_fail (visual != NULL, NULL);
- context = g_object_new(GDK_TYPE_GL_CONTEXT, NULL);
+ context = g_object_new(GGLA_TYPE_CONTEXT, NULL);
if (!context)
return NULL;
@@ -292,21 +292,21 @@ gdk_gl_context_share_new(GdkVisual *visual, GdkGLContext *sharelist, gint direct
return context;
}
-GdkGLContext *gdk_gl_context_attrlist_share_new(int *attrlist, GdkGLContext *sharelist, gint direct)
+GglaContext *ggla_context_attrlist_share_new(int *attrlist, GglaContext *sharelist, gint direct)
{
#if defined GDK_WINDOWING_WIN32
- GdkGLContext *context;
+ GglaContext *context;
#elif defined GDK_WINDOWING_X11
GdkVisual *visual;
#else
- g_warning ("gdk_gl_context_attrlist_share_new not implemented on " PLATFORM);
+ g_warning ("ggla_context_attrlist_share_new not implemented on " PLATFORM);
return NULL;
#endif
g_return_val_if_fail(attrlist != NULL, NULL);
#if defined GDK_WINDOWING_WIN32
- context = g_object_new(GDK_TYPE_GL_CONTEXT, NULL);
+ context = g_object_new(GGLA_TYPE_CONTEXT, NULL);
if (!context)
return NULL;
@@ -319,19 +319,19 @@ GdkGLContext *gdk_gl_context_attrlist_share_new(int *attrlist, GdkGLContext *sha
return context;
#elif defined GDK_WINDOWING_X11
- visual = gdk_gl_choose_visual(attrlist);
+ visual = ggla_choose_visual(attrlist);
if (!visual)
return NULL;
- return gdk_gl_context_share_new(visual, sharelist, direct);
+ return ggla_context_share_new(visual, sharelist, direct);
#endif
}
-gint gdk_gl_make_current(GdkWindow *gdkwindow, GdkGLContext *context)
+gint ggla_make_current(GdkWindow *gdkwindow, GglaContext *context)
{
g_return_val_if_fail (GDK_IS_WINDOW(gdkwindow), FALSE);
- g_return_val_if_fail (GDK_IS_GL_CONTEXT(context), FALSE);
+ g_return_val_if_fail (GGLA_IS_CONTEXT(context), FALSE);
#if defined GDK_WINDOWING_WIN32
if (!context->initialised)
@@ -384,11 +384,11 @@ gint gdk_gl_make_current(GdkWindow *gdkwindow, GdkGLContext *context)
}
#endif
#else
- g_warning ("gdk_gl_make_current not implemented on " PLATFORM);
+ g_warning ("ggla_make_current not implemented on " PLATFORM);
#endif
}
-void gdk_gl_swap_buffers(GdkWindow *gdkwindow)
+void ggla_swap_buffers(GdkWindow *gdkwindow)
{
#if defined GDK_WINDOWING_WIN32
HDC hdc;
@@ -402,7 +402,7 @@ void gdk_gl_swap_buffers(GdkWindow *gdkwindow)
hdc = GetDC (hwnd);
if (hdc == NULL)
{
- g_warning ("gdk_gl_swap_buffers: GetDC failed");
+ g_warning ("ggla_swap_buffers: GetDC failed");
return;
}
SwapBuffers (hdc);
@@ -412,11 +412,11 @@ void gdk_gl_swap_buffers(GdkWindow *gdkwindow)
glXSwapBuffers(gdk_x11_display_get_xdisplay (gdkdisplay),
gdk_x11_window_get_xid (gdkwindow));
#else
- g_warning ("gdk_gl_swap_buffers not implemented on " PLATFORM);
+ g_warning ("ggla_swap_buffers not implemented on " PLATFORM);
#endif
}
-void gdk_gl_wait_gdk(void)
+void ggla_wait_gdk(void)
{
#if defined GDK_WINDOWING_WIN32
GdiFlush();
@@ -425,7 +425,7 @@ void gdk_gl_wait_gdk(void)
#endif
}
-void gdk_gl_wait_gl (void)
+void ggla_wait_gl (void)
{
#if defined GDK_WINDOWING_WIN32
glFinish();
@@ -461,56 +461,56 @@ static void fill_pfd(PIXELFORMATDESCRIPTOR *pfd, int *attriblist)
while (*p) {
switch (*p) {
- case GDK_GL_USE_GL:
+ case GGLA_USE_GL:
pfd->dwFlags |= PFD_SUPPORT_OPENGL;
break;
- case GDK_GL_BUFFER_SIZE:
+ case GGLA_BUFFER_SIZE:
pfd->cColorBits = *(++p);
break;
- case GDK_GL_LEVEL:
+ case GGLA_LEVEL:
/* the bReserved flag of the pfd contains the
overlay/underlay info. */
pfd->bReserved = *(++p);
break;
- case GDK_GL_RGBA:
+ case GGLA_RGBA:
pfd->iPixelType = PFD_TYPE_RGBA;
break;
- case GDK_GL_DOUBLEBUFFER:
+ case GGLA_DOUBLEBUFFER:
pfd->dwFlags |= PFD_DOUBLEBUFFER;
break;
- case GDK_GL_STEREO:
+ case GGLA_STEREO:
pfd->dwFlags |= PFD_STEREO;
break;
- case GDK_GL_AUX_BUFFERS:
+ case GGLA_AUX_BUFFERS:
pfd->cAuxBuffers = *(++p);
break;
- case GDK_GL_RED_SIZE:
+ case GGLA_RED_SIZE:
pfd->cRedBits = 8; /* Try to get the maximum. */
++p;
break;
- case GDK_GL_GREEN_SIZE:
+ case GGLA_GREEN_SIZE:
pfd->cGreenBits = 8;
++p;
break;
- case GDK_GL_BLUE_SIZE:
+ case GGLA_BLUE_SIZE:
pfd->cBlueBits = 8;
++p;
break;
- case GDK_GL_ALPHA_SIZE:
+ case GGLA_ALPHA_SIZE:
pfd->cAlphaBits = 8;
++p;
break;
- case GDK_GL_DEPTH_SIZE:
+ case GGLA_DEPTH_SIZE:
pfd->cDepthBits = 32;
++p;
break;
- case GDK_GL_STENCIL_SIZE:
+ case GGLA_STENCIL_SIZE:
pfd->cStencilBits = *(++p);
break;
- case GDK_GL_ACCUM_RED_SIZE:
- case GDK_GL_ACCUM_GREEN_SIZE:
- case GDK_GL_ACCUM_BLUE_SIZE:
- case GDK_GL_ACCUM_ALPHA_SIZE:
+ case GGLA_ACCUM_RED_SIZE:
+ case GGLA_ACCUM_GREEN_SIZE:
+ case GGLA_ACCUM_BLUE_SIZE:
+ case GGLA_ACCUM_ALPHA_SIZE:
/* I believe that WGL only used the cAccumRedBits,
cAccumBlueBits, cAccumGreenBits, and cAccumAlphaBits fields
when returning info about the accumulation buffer precision.
diff --git a/gtkgl/gdkgl.h b/gtkgl/gdkgl.h
index 5543297..97d384c 100644
--- a/gtkgl/gdkgl.h
+++ b/gtkgl/gdkgl.h
@@ -16,8 +16,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef __GDK_GL_H__
-#define __GDK_GL_H__
+#ifndef __GGLA_CONTEXT_H__
+#define __GGLA_CONTEXT_H__
#include <glib.h>
@@ -38,67 +38,67 @@ G_BEGIN_DECLS
* supports lecacy systems like Windows. You can still use GLX_xxxx
* attributes with these, but then you lose portability.
*/
-enum _GDK_GL_CONFIGS {
- GDK_GL_NONE = 0,
- GDK_GL_USE_GL = 1,
- GDK_GL_BUFFER_SIZE = 2,
- GDK_GL_LEVEL = 3,
- GDK_GL_RGBA = 4,
- GDK_GL_DOUBLEBUFFER = 5,
- GDK_GL_STEREO = 6,
- GDK_GL_AUX_BUFFERS = 7,
- GDK_GL_RED_SIZE = 8,
- GDK_GL_GREEN_SIZE = 9,
- GDK_GL_BLUE_SIZE = 10,
- GDK_GL_ALPHA_SIZE = 11,
- GDK_GL_DEPTH_SIZE = 12,
- GDK_GL_STENCIL_SIZE = 13,
- GDK_GL_ACCUM_RED_SIZE = 14,
- GDK_GL_ACCUM_GREEN_SIZE = 15,
- GDK_GL_ACCUM_BLUE_SIZE = 16,
- GDK_GL_ACCUM_ALPHA_SIZE = 17,
+enum _GGLA_CONFIGS {
+ GGLA_NONE = 0,
+ GGLA_USE_GL = 1,
+ GGLA_BUFFER_SIZE = 2,
+ GGLA_LEVEL = 3,
+ GGLA_RGBA = 4,
+ GGLA_DOUBLEBUFFER = 5,
+ GGLA_STEREO = 6,
+ GGLA_AUX_BUFFERS = 7,
+ GGLA_RED_SIZE = 8,
+ GGLA_GREEN_SIZE = 9,
+ GGLA_BLUE_SIZE = 10,
+ GGLA_ALPHA_SIZE = 11,
+ GGLA_DEPTH_SIZE = 12,
+ GGLA_STENCIL_SIZE = 13,
+ GGLA_ACCUM_RED_SIZE = 14,
+ GGLA_ACCUM_GREEN_SIZE = 15,
+ GGLA_ACCUM_BLUE_SIZE = 16,
+ GGLA_ACCUM_ALPHA_SIZE = 17,
/* GLX_EXT_visual_info extension */
- GDK_GL_X_VISUAL_TYPE_EXT = 0x22,
- GDK_GL_TRANSPARENT_TYPE_EXT = 0x23,
- GDK_GL_TRANSPARENT_INDEX_VALUE_EXT = 0x24,
- GDK_GL_TRANSPARENT_RED_VALUE_EXT = 0x25,
- GDK_GL_TRANSPARENT_GREEN_VALUE_EXT = 0x26,
- GDK_GL_TRANSPARENT_BLUE_VALUE_EXT = 0x27,
- GDK_GL_TRANSPARENT_ALPHA_VALUE_EXT = 0x28
+ GGLA_X_VISUAL_TYPE_EXT = 0x22,
+ GGLA_TRANSPARENT_TYPE_EXT = 0x23,
+ GGLA_TRANSPARENT_INDEX_VALUE_EXT = 0x24,
+ GGLA_TRANSPARENT_RED_VALUE_EXT = 0x25,
+ GGLA_TRANSPARENT_GREEN_VALUE_EXT = 0x26,
+ GGLA_TRANSPARENT_BLUE_VALUE_EXT = 0x27,
+ GGLA_TRANSPARENT_ALPHA_VALUE_EXT = 0x28
};
-#define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type())
-#define GDK_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_CONTEXT,
GdkGLContext))
-#define GDK_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDK_TYPE_GL_CONTEXT,
GdkGLContextClass))
-#define GDK_IS_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_CONTEXT))
-#define GDK_IS_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GL_CONTEXT))
-#define GDK_GL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GL_CONTEXT, GdkGLContext))
+#define GGLA_TYPE_CONTEXT (ggla_context_get_type())
+#define GGLA_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGLA_TYPE_CONTEXT, GglaContext))
+#define GGLA_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GGLA_TYPE_CONTEXT, GglaContextClass))
+#define GGLA_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGLA_TYPE_CONTEXT))
+#define GGLA_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGLA_TYPE_CONTEXT))
+#define GGLA_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GGLA_TYPE_CONTEXT, GglaContext))
-typedef struct _GdkGLContext GdkGLContext;
+typedef struct _GglaContext GglaContext;
-gint gdk_gl_query(void);
-gchar *gdk_gl_get_info(void);
+gint ggla_query(void);
+gchar *ggla_get_info(void);
-GdkVisual *gdk_gl_choose_visual(int *attrlist);
-int gdk_gl_get_config(GdkVisual *visual, int attrib);
+GdkVisual *ggla_choose_visual(int *attrlist);
+int ggla_get_config(GdkVisual *visual, int attrib);
-GType gdk_gl_context_get_type(void);
-GdkGLContext *gdk_gl_context_new(GdkVisual *visual);
-GdkGLContext *gdk_gl_context_share_new(GdkVisual *visual, GdkGLContext *sharelist, gint direct);
-GdkGLContext *gdk_gl_context_attrlist_share_new(int *attrlist, GdkGLContext *sharelist, gint direct);
+GType ggla_context_get_type(void);
+GglaContext *ggla_context_new(GdkVisual *visual);
+GglaContext *ggla_context_share_new(GdkVisual *visual, GglaContext *sharelist, gint direct);
+GglaContext *ggla_context_attrlist_share_new(int *attrlist, GglaContext *sharelist, gint direct);
-gint gdk_gl_make_current(GdkWindow *gdkwindow, GdkGLContext *context);
-void gdk_gl_swap_buffers(GdkWindow *gdkwindow);
+gint ggla_make_current(GdkWindow *gdkwindow, GglaContext *context);
+void ggla_swap_buffers(GdkWindow *gdkwindow);
-void gdk_gl_wait_gdk(void);
-void gdk_gl_wait_gl(void);
+void ggla_wait_gdk(void);
+void ggla_wait_gl(void);
G_END_DECLS
-#endif /* __GDK_GL_H__ */
+#endif /* __GGLA_CONTEXT_H__ */
diff --git a/gtkgl/gtkgl.def b/gtkgl/gtkgl.def
index f0cf2d1..f78a68d 100644
--- a/gtkgl/gtkgl.def
+++ b/gtkgl/gtkgl.def
@@ -1,18 +1,18 @@
EXPORTS
- gdk_gl_choose_visual
- gdk_gl_context_attrlist_share_new
- gdk_gl_context_new
- gdk_gl_context_share_new
- gdk_gl_get_config
- gdk_gl_get_info
- gdk_gl_make_current
- gdk_gl_pixmap_make_current
- gdk_gl_pixmap_new
- gdk_gl_query
- gdk_gl_swap_buffers
- gdk_gl_use_gdk_font
- gdk_gl_wait_gdk
- gdk_gl_wait_gl
+ ggla_choose_visual
+ ggla_context_attrlist_share_new
+ ggla_context_new
+ ggla_context_share_new
+ ggla_get_config
+ ggla_get_info
+ ggla_make_current
+ ggla_pixmap_make_current
+ ggla_pixmap_new
+ ggla_query
+ ggla_swap_buffers
+ ggla_use_gdk_font
+ ggla_wait_gdk
+ ggla_wait_gl
ggla_widget_get_type
ggla_widget_make_current
ggla_widget_new
diff --git a/gtkgl/gtkglarea.c b/gtkgl/gtkglarea.c
index 944b86a..7a8a36d 100644
--- a/gtkgl/gtkglarea.c
+++ b/gtkgl/gtkglarea.c
@@ -57,7 +57,7 @@ ggla_widget_new_vargs(GglaWidget *share, ...)
va_start(ap, share);
i=1;
- while (va_arg(ap, int) != GDK_GL_NONE) /* get number of arguments */
+ while (va_arg(ap, int) != GGLA_NONE) /* get number of arguments */
i++;
va_end(ap);
@@ -65,7 +65,7 @@ ggla_widget_new_vargs(GglaWidget *share, ...)
va_start(ap,share);
i=0;
- while ( (attrlist[i] = va_arg(ap, int)) != GDK_GL_NONE) /* copy args to list */
+ while ( (attrlist[i] = va_arg(ap, int)) != GGLA_NONE) /* copy args to list */
i++;
va_end(ap);
@@ -85,7 +85,7 @@ ggla_widget_new (int *attrlist)
GtkWidget*
ggla_widget_share_new (int *attrlist, GglaWidget *share)
{
- GdkGLContext *glcontext;
+ GglaContext *glcontext;
GglaWidget *gl_area;
#if defined GDK_WINDOWING_X11
GdkVisual *visual;
@@ -94,13 +94,13 @@ ggla_widget_share_new (int *attrlist, GglaWidget *share)
g_return_val_if_fail(share == NULL || GGLA_IS_WIDGET(share), NULL);
#if defined GDK_WINDOWING_X11
- visual = gdk_gl_choose_visual(attrlist);
+ visual = ggla_choose_visual(attrlist);
if (visual == NULL)
return NULL;
- glcontext = gdk_gl_context_share_new(visual, share ? share->glcontext : NULL, TRUE);
+ glcontext = ggla_context_share_new(visual, share ? share->glcontext : NULL, TRUE);
#else
- glcontext = gdk_gl_context_attrlist_share_new(attrlist, share ? share->glcontext : NULL, TRUE);
+ glcontext = ggla_context_attrlist_share_new(attrlist, share ? share->glcontext : NULL, TRUE);
#endif
if (glcontext == NULL)
return NULL;
@@ -132,8 +132,8 @@ gint ggla_widget_make_current(GglaWidget *gl_area)
GtkWidget *widget = GTK_WIDGET (gl_area);
g_return_val_if_fail(gtk_widget_get_realized(widget), FALSE);
- return gdk_gl_make_current(gtk_widget_get_window (widget),
- gl_area->glcontext);
+ return ggla_make_current(gtk_widget_get_window (widget),
+ gl_area->glcontext);
}
void ggla_widget_swap_buffers(GglaWidget *gl_area)
@@ -143,5 +143,5 @@ void ggla_widget_swap_buffers(GglaWidget *gl_area)
GtkWidget *widget = GTK_WIDGET (gl_area);
g_return_if_fail(gtk_widget_get_realized(widget));
- gdk_gl_swap_buffers(gtk_widget_get_window (widget));
+ ggla_swap_buffers(gtk_widget_get_window (widget));
}
diff --git a/gtkgl/gtkglarea.h b/gtkgl/gtkglarea.h
index 3e0530b..9080bb8 100644
--- a/gtkgl/gtkglarea.h
+++ b/gtkgl/gtkglarea.h
@@ -42,7 +42,7 @@ typedef struct _GglaWidgetClass GglaWidgetClass;
struct _GglaWidget
{
GtkDrawingArea darea;
- GdkGLContext *glcontext;
+ GglaContext *glcontext;
};
struct _GglaWidgetClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]