[gtkglarea/jjardon/gtk3: 19/21] examples: Port to new name space
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkglarea/jjardon/gtk3: 19/21] examples: Port to new name space
- Date: Tue, 5 Aug 2014 01:11:35 +0000 (UTC)
commit e7a363c723ae857684a4942a836d66e32f3af603
Author: Javier Jardón <jjardon gnome org>
Date: Wed Mar 26 20:55:18 2014 +0000
examples: Port to new name space
examples/gtkglarea_demo.c | 64 ++++++++++++++++++++++----------------------
examples/shaders.c | 38 +++++++++++++-------------
examples/simple.c | 28 ++++++++++----------
examples/viewlw.c | 28 ++++++++++----------
examples/zktor.c | 30 ++++++++++----------
5 files changed, 94 insertions(+), 94 deletions(-)
---
diff --git a/examples/gtkglarea_demo.c b/examples/gtkglarea_demo.c
index 5537291..19b7e7a 100644
--- a/examples/gtkglarea_demo.c
+++ b/examples/gtkglarea_demo.c
@@ -19,9 +19,9 @@
******************************************************************************
*
* This is a short, heavily commented demo program designed to help
- * get you started using the GtkGLArea widget in your gtk programs.
+ * get you started using the GglaWidget widget in your gtk programs.
*
- * The program creates a window with a GtkGLArea widget and a quit button.
+ * The program creates a window with a GglaWidget widget and a quit button.
* Some commonly used callbacks are registered, but nothing is drawn into
* the window.
*
@@ -75,7 +75,7 @@ GtkWidget* create_glarea (void) {
/* Choose the attributes that we would like for our visual. */
/* These attributes are passed to glXChooseVisual by the */
- /* gdk (see gdk_gl_choose_visual in gdkgl.c from the */
+ /* gdk (see ggla_choose_visual in gdkgl.c from the */
/* GtkGlarea distro). */
/* */
/* */
@@ -89,25 +89,25 @@ GtkWidget* create_glarea (void) {
/* and their descriptions. */
int attrlist[] = {
- GDK_GL_RGBA,
- GDK_GL_DOUBLEBUFFER,
- GDK_GL_DEPTH_SIZE, 1,
- GDK_GL_NONE
+ GGLA_RGBA,
+ GGLA_DOUBLEBUFFER,
+ GGLA_DEPTH_SIZE, 1,
+ GGLA_NONE
};
/* First things first! Make sure that OpenGL is supported */
/* before trying to do OpenGL stuff! */
- if(gdk_gl_query() == FALSE) {
+ if(ggla_query() == FALSE) {
g_print("OpenGL not supported!\n");
return NULL;
}
- /* Now, create the GtkGLArea using the attribute list that */
+ /* Now, create the GglaWidget using the attribute list that */
/* we defined above. */
- if ((glarea = gtk_gl_area_new(attrlist)) == NULL) {
- g_print("Error creating GtkGLArea!\n");
+ if ((glarea = ggla_widget_new(attrlist)) == NULL) {
+ g_print("Error creating GglaWidget!\n");
return NULL;
}
@@ -172,7 +172,7 @@ GtkWidget* create_glarea (void) {
/* destroy - The window has received a destroy event, this */
/* is where you should do any cleanup that needs */
/* to happen, such as de-allocating data objects */
- /* that you have added to your GtkGLArea. */
+ /* that you have added to your GglaWidget. */
g_signal_connect (G_OBJECT(glarea), "destroy",
G_CALLBACK (glarea_destroy), NULL);
@@ -187,7 +187,7 @@ GtkWidget* create_glarea (void) {
/* */
/* Function: glarea_button_release (GtkWidget*, GdkEventButton*) */
/* */
-/* This function handles button-release events for the GtkGLArea into which */
+/* This function handles button-release events for the GglaWidget into which */
/* we are drawing. */
/* */
/*****************************************************************************/
@@ -223,7 +223,7 @@ gint glarea_button_release (GtkWidget* widget, GdkEventButton* event) {
/* */
/* Function: glarea_button_press (GtkWidget*, GdkEventButton*) */
/* */
-/* This function handles button-press events for the GtkGLArea into which we */
+/* This function handles button-press events for the GglaWidget into which we */
/* are drawing. */
/* */
/*****************************************************************************/
@@ -258,7 +258,7 @@ gint glarea_button_press (GtkWidget* widget, GdkEventButton* event) {
/* */
/* Function: glarea_motion_notify (GtkWidget*, GdkEventMotion*) */
/* */
-/* This function handles motion events for the GtkGLArea into which we are */
+/* This function handles motion events for the GglaWidget into which we are */
/* drawing */
/* */
/*****************************************************************************/
@@ -302,7 +302,7 @@ gint glarea_motion_notify (GtkWidget* widget, GdkEventMotion* event) {
/* */
/* Function: glarea_draw (GtkWidget*, cairo_t *cr, gpointer user_data) */
/* */
-/* This is the function that should render your scene to the GtkGLArea. It */
+/* This is the function that should render your scene to the GglaWidget. It */
/* can be used as a callback to the 'draw' signal. */
/* */
/*****************************************************************************/
@@ -311,10 +311,10 @@ gboolean glarea_draw (GtkWidget* widget, cairo_t *cr, gpointer user_data) {
g_print ("Draw Signal\n");
- /* gtk_gl_area_make_current MUST be called before rendering */
- /* into the GtkGLArea. */
+ /* ggla_widget_make_current MUST be called before rendering */
+ /* into the GglaWidget. */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current(GGLA_WIDGET(widget))) {
/* Clear the drawing color buffer and depth buffers */
/* before drawing. */
@@ -330,7 +330,7 @@ gboolean glarea_draw (GtkWidget* widget, cairo_t *cr, gpointer user_data) {
/* book if you don't already have an understanding of */
/* single vs. double buffered windows. */
- gtk_gl_area_swap_buffers (GTK_GL_AREA(widget));
+ ggla_widget_swap_buffers (GGLA_WIDGET(widget));
}
@@ -343,7 +343,7 @@ gboolean glarea_draw (GtkWidget* widget, cairo_t *cr, gpointer user_data) {
/* Function: glarea_reshape (GtkWidget*, GdkEventConfigure*) */
/* */
/* This function performs the operations needed to maintain the viewing area */
-/* of the GtkGLArea. This should be called whenever the size of the area */
+/* of the GglaWidget. This should be called whenever the size of the area */
/* is changed. */
/* */
/*****************************************************************************/
@@ -357,10 +357,10 @@ gint glarea_reshape (GtkWidget* widget, GdkEventConfigure* event) {
g_print ("Reshape Event\n");
- /* gtk_gl_area_make_current MUST be called before rendering */
- /* into the GtkGLArea. */
+ /* ggla_widget_make_current MUST be called before rendering */
+ /* into the GglaWidget. */
- if (gtk_gl_area_make_current (GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current (GGLA_WIDGET(widget))) {
/* This is an example 2D reshape function. Writing reshape */
/* functions is beyond the scope of this demo. Check the */
@@ -383,7 +383,7 @@ gint glarea_reshape (GtkWidget* widget, GdkEventConfigure* event) {
/* */
/* Function: glarea_init (GtkWidget*) */
/* */
-/* This function is a callback for the realization of the GtkGLArea widtget. */
+/* This function is a callback for the realization of the GglaWidget widtget. */
/* You should do any OpenGL initialization here. */
/* */
/*****************************************************************************/
@@ -392,10 +392,10 @@ gint glarea_init (GtkWidget* widget) {
g_print ("Realize Event\n");
- /* gtk_gl_area_make_current MUST be called before rendering */
- /* into the GtkGLArea. */
+ /* ggla_widget_make_current MUST be called before rendering */
+ /* into the GglaWidget. */
- if (gtk_gl_area_make_current (GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current (GGLA_WIDGET(widget))) {
/* Insert your OpenGL initialization code here */
@@ -409,8 +409,8 @@ gint glarea_init (GtkWidget* widget) {
/* */
/* Function: glarea_destroy (GtkWidget*) */
/* */
-/* This function is a callback for the main GtkGLArea. It deletes should */
-/* delete any data structures stored in the GtkGLArea. */
+/* This function is a callback for the main GglaWidget. It deletes should */
+/* delete any data structures stored in the GglaWidget. */
/* */
/*****************************************************************************/
@@ -430,7 +430,7 @@ gint glarea_destroy (GtkWidget* widget) {
/* Function: main (int, char**) */
/* */
/* The main function sets up our GUI and calls the functions needed to */
-/* create our GtkGLArea. */
+/* create our GglaWidget. */
/* */
/*****************************************************************************/
@@ -462,7 +462,7 @@ int main (int argc, char** argv) {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title (GTK_WINDOW(window), "GtkGLArea Demo");
+ gtk_window_set_title (GTK_WINDOW(window), "GglaWidget Demo");
g_signal_connect (G_OBJECT(window), "delete-event",
G_CALLBACK(gtk_main_quit), NULL);
diff --git a/examples/shaders.c b/examples/shaders.c
index 50c03d4..773473c 100644
--- a/examples/shaders.c
+++ b/examples/shaders.c
@@ -19,7 +19,7 @@
* *
******************************************************************************
*
- * This program creates a window with a GtkGLArea widget using a Vertex
+ * This program creates a window with a GglaWidget widget using a Vertex
* Shader and a Fragment shader. It should display a coloured texture. A
* grayscale result means the shaders are not supported.
*
@@ -226,19 +226,19 @@ GtkWidget* create_glarea (void) {
GtkWidget* glarea;
int attrlist[] = {
- GDK_GL_RGBA,
- GDK_GL_DOUBLEBUFFER,
- GDK_GL_DEPTH_SIZE, 1,
- GDK_GL_NONE
+ GGLA_RGBA,
+ GGLA_DOUBLEBUFFER,
+ GGLA_DEPTH_SIZE, 1,
+ GGLA_NONE
};
- if(gdk_gl_query() == FALSE) {
+ if(ggla_query() == FALSE) {
g_print("OpenGL not supported!\n");
return NULL;
}
- if ((glarea = gtk_gl_area_new(attrlist)) == NULL) {
- g_print("Error creating GtkGLArea!\n");
+ if ((glarea = ggla_widget_new(attrlist)) == NULL) {
+ g_print("Error creating GglaWidget!\n");
return NULL;
}
@@ -287,18 +287,18 @@ gint glarea_draw_scene (void) {
/* */
/* Function: glarea_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)*/
/* */
-/* This is the function that should render your scene to the GtkGLArea. It */
+/* This is the function that should render your scene to the GglaWidget. It */
/* can be used as a callback to the 'draw' signal. */
/* */
/*****************************************************************************/
gboolean glarea_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) {
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current(GGLA_WIDGET(widget))) {
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glarea_draw_scene();
- gtk_gl_area_swap_buffers (GTK_GL_AREA(widget));
+ ggla_widget_swap_buffers (GGLA_WIDGET(widget));
}
@@ -311,7 +311,7 @@ gboolean glarea_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) {
/* Function: glarea_reshape (GtkWidget*, GdkEventConfigure*) */
/* */
/* This function performs the operations needed to maintain the viewing area */
-/* of the GtkGLArea. This should be called whenever the size of the area */
+/* of the GglaWidget. This should be called whenever the size of the area */
/* is changed. */
/* */
/*****************************************************************************/
@@ -323,7 +323,7 @@ gint glarea_reshape (GtkWidget* widget, GdkEventConfigure* event) {
int w = allocation.width;
int h = allocation.height;
- if (gtk_gl_area_make_current (GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current (GGLA_WIDGET(widget))) {
glViewport (0, 0, w, h);
glMatrixMode (GL_PROJECTION);
@@ -341,14 +341,14 @@ gint glarea_reshape (GtkWidget* widget, GdkEventConfigure* event) {
/* */
/* Function: glarea_init (GtkWidget*) */
/* */
-/* This function is a callback for the realization of the GtkGLArea widtget. */
+/* This function is a callback for the realization of the GglaWidget widtget. */
/* You should do any OpenGL initialization here. */
/* */
/*****************************************************************************/
gint glarea_init (GtkWidget* widget) {
- if (gtk_gl_area_make_current (GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current (GGLA_WIDGET(widget))) {
/* Procedural texture creation */
@@ -380,8 +380,8 @@ gint glarea_init (GtkWidget* widget) {
/* */
/* Function: glarea_destroy (GtkWidget*) */
/* */
-/* This function is a callback for the main GtkGLArea. It deletes should */
-/* delete any data structures stored in the GtkGLArea. */
+/* This function is a callback for the main GglaWidget. It deletes should */
+/* delete any data structures stored in the GglaWidget. */
/* */
/*****************************************************************************/
@@ -401,7 +401,7 @@ gint glarea_destroy (GtkWidget* widget) {
/* Function: main (int, char**) */
/* */
/* The main function sets up our GUI and calls the functions needed to */
-/* create our GtkGLArea. */
+/* create our GglaWidget. */
/* */
/*****************************************************************************/
@@ -440,7 +440,7 @@ int main (int argc, char** argv) {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title (GTK_WINDOW(window), "GtkGLArea Shader Demo");
+ gtk_window_set_title (GTK_WINDOW(window), "GglaWidget Shader Demo");
g_signal_connect (G_OBJECT(window), "delete-event",
G_CALLBACK(gtk_main_quit), NULL);
diff --git a/examples/simple.c b/examples/simple.c
index ff08266..1802022 100644
--- a/examples/simple.c
+++ b/examples/simple.c
@@ -24,7 +24,7 @@
gint init(GtkWidget *widget)
{
/* OpenGL functions can be called only if make_current returns true */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget)))
+ if (ggla_widget_make_current(GGLA_WIDGET(widget)))
{
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
@@ -43,7 +43,7 @@ gint init(GtkWidget *widget)
gboolean draw (GtkWidget *widget, cairo_t *cr, gpointer data)
{
/* OpenGL functions can be called only if make_current returns true */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget)))
+ if (ggla_widget_make_current(GGLA_WIDGET(widget)))
{
/* Draw simple triangle */
@@ -57,7 +57,7 @@ gboolean draw (GtkWidget *widget, cairo_t *cr, gpointer data)
glEnd();
/* Swap backbuffer to front */
- gtk_gl_area_swap_buffers(GTK_GL_AREA(widget));
+ ggla_widget_swap_buffers(GGLA_WIDGET(widget));
}
@@ -68,7 +68,7 @@ gboolean draw (GtkWidget *widget, cairo_t *cr, gpointer data)
gint reshape(GtkWidget *widget, GdkEventConfigure *event)
{
/* OpenGL functions can be called only if make_current returns true */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget)))
+ if (ggla_widget_make_current(GGLA_WIDGET(widget)))
{
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
@@ -86,23 +86,23 @@ int main(int argc, char **argv)
/* Attribute list for gtkglarea widget. Specifies a
list of Boolean attributes and enum/integer
attribute/value pairs. The last attribute must be
- GDK_GL_NONE. See glXChooseVisual manpage for further
+ GGLA_NONE. See glXChooseVisual manpage for further
explanation.
*/
int attrlist[] = {
- GDK_GL_RGBA,
- GDK_GL_RED_SIZE,1,
- GDK_GL_GREEN_SIZE,1,
- GDK_GL_BLUE_SIZE,1,
- GDK_GL_DOUBLEBUFFER,
- GDK_GL_NONE
+ GGLA_RGBA,
+ GGLA_RED_SIZE,1,
+ GGLA_GREEN_SIZE,1,
+ GGLA_BLUE_SIZE,1,
+ GGLA_DOUBLEBUFFER,
+ GGLA_NONE
};
/* initialize gtk */
gtk_init(&argc, &argv);
/* Check if OpenGL is supported. */
- if (gdk_gl_query() == FALSE) {
+ if (ggla_query() == FALSE) {
g_print("OpenGL not supported\n");
return 0;
}
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
/* Create new OpenGL widget. */
- glarea = GTK_WIDGET(gtk_gl_area_new(attrlist));
+ glarea = GTK_WIDGET(ggla_widget_new(attrlist));
/* Events for widget must be set before X Window is created */
gtk_widget_set_events(GTK_WIDGET(glarea),
GDK_EXPOSURE_MASK|
@@ -145,7 +145,7 @@ int main(int argc, char **argv)
gtk_widget_show(GTK_WIDGET(window));
/* vendor dependent version info string */
- info_str = gdk_gl_get_info();
+ info_str = ggla_get_info();
g_print(info_str);
g_free(info_str);
diff --git a/examples/viewlw.c b/examples/viewlw.c
index 3fbeffe..17b1380 100644
--- a/examples/viewlw.c
+++ b/examples/viewlw.c
@@ -105,11 +105,11 @@ gboolean glarea_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
GLfloat m[4][4];
- GtkGLArea *glarea = GTK_GL_AREA(widget);
+ GglaWidget *glarea = GGLA_WIDGET(widget);
mesh_info *info = (mesh_info*) g_object_get_data (G_OBJECT (widget), "mesh_info");
/* OpenGL calls can be done only if make_current returns true */
- if (gtk_gl_area_make_current(glarea)) {
+ if (ggla_widget_make_current(glarea)) {
/* basic initialization */
if (info->do_init == TRUE) {
initgl();
@@ -134,7 +134,7 @@ gboolean glarea_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
lw_object_show(info->lwobject);
/* swap backbuffer to front */
- gtk_gl_area_swap_buffers(glarea);
+ ggla_widget_swap_buffers(glarea);
}
return TRUE;
@@ -143,7 +143,7 @@ gboolean glarea_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
gint glarea_configure(GtkWidget *widget, GdkEventConfigure *event)
{
/* OpenGL calls can be done only if make_current returns true */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current(GGLA_WIDGET(widget))) {
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
glViewport(0, 0, allocation.width, allocation.height);
@@ -306,17 +306,17 @@ gint show_lwobject(char const *lwobject_name)
/* create new OpenGL widget */
- glarea = gtk_gl_area_new_vargs(NULL, /* no sharing */
- GDK_GL_RGBA,
- GDK_GL_RED_SIZE,1,
- GDK_GL_GREEN_SIZE,1,
- GDK_GL_BLUE_SIZE,1,
- GDK_GL_DEPTH_SIZE,1,
- GDK_GL_DOUBLEBUFFER,
- GDK_GL_NONE); /* last argument must be GDK_GL_NONE */
+ glarea = ggla_widget_new_vargs(NULL, /* no sharing */
+ GGLA_RGBA,
+ GGLA_RED_SIZE,1,
+ GGLA_GREEN_SIZE,1,
+ GGLA_BLUE_SIZE,1,
+ GGLA_DEPTH_SIZE,1,
+ GGLA_DOUBLEBUFFER,
+ GGLA_NONE); /* last argument must be GDK_GL_NONE */
if (glarea == NULL) {
lw_object_free(lwobject);
- g_print("Can't create GtkGLArea widget\n");
+ g_print("Can't create GglaWidget widget\n");
return FALSE;
}
/* set up events and signals for OpenGL widget */
@@ -420,7 +420,7 @@ int main (int argc, char **argv)
gtk_init( &argc, &argv );
/* Check if OpenGL is supported. */
- if (gdk_gl_query() == FALSE) {
+ if (ggla_query() == FALSE) {
g_print("OpenGL not supported\n");
return 0;
}
diff --git a/examples/zktor.c b/examples/zktor.c
index 068a130..81c8d45 100644
--- a/examples/zktor.c
+++ b/examples/zktor.c
@@ -699,7 +699,7 @@ gint switch_fullscreen(GtkWidget *gl_area)
if (gdk_pointer_grab(gl_area->window, FALSE, 0, NULL, NULL, GDK_CURRENT_TIME) == 0)
{
gtk_widget_grab_focus(gl_area);
- if (gtk_gl_area_make_current(GTK_GL_AREA(gl_area)))
+ if (ggla_widget_make_current(GGLA_WIDGET(gl_area)))
{
if (XMesaSetFXmode((XMESA_FX_FULLSCREEN)))
{
@@ -716,7 +716,7 @@ gint switch_fullscreen(GtkWidget *gl_area)
if (fullscreenwidget == gl_area)
{
- if (gtk_gl_area_make_current(GTK_GL_AREA(gl_area)))
+ if (ggla_widget_make_current(GGLA_WIDGET(gl_area)))
XMesaSetFXmode(XMESA_FX_WINDOW);
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
@@ -736,7 +736,7 @@ gint switch_fullscreen(GtkWidget *gl_area)
gint init(GtkWidget *widget)
{
/* OpenGL functions can be called only if makecurrent returns true */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget))) {
+ if (ggla_widget_make_current(GGLA_WIDGET(widget))) {
/* set viewport */
GtkAllocation allocation;
@@ -750,11 +750,11 @@ gint init(GtkWidget *widget)
/* When widget is exposed it's contents are redrawn. */
gboolean draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget)))
+ if (ggla_widget_make_current(GGLA_WIDGET(widget)))
game_render();
/* Swap backbuffer to front */
- gtk_gl_area_swap_buffers(GTK_GL_AREA(widget));
+ ggla_widget_swap_buffers(GGLA_WIDGET(widget));
return TRUE;
}
@@ -763,7 +763,7 @@ gboolean draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
gint reshape(GtkWidget *widget, GdkEventConfigure *event)
{
/* OpenGL functions can be called only if make_current returns true */
- if (gtk_gl_area_make_current(GTK_GL_AREA(widget)))
+ if (ggla_widget_make_current(GGLA_WIDGET(widget)))
{
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
@@ -849,16 +849,16 @@ int main(int argc, char **argv)
/* Attribute list for gtkglarea widget. Specifies a
list of Boolean attributes and enum/integer
attribute/value pairs. The last attribute must be
- GDK_GL_NONE. See glXChooseVisual manpage for further
+ GGLA_NONE. See glXChooseVisual manpage for further
explanation.
*/
int attrlist[] = {
- GDK_GL_RGBA,
- GDK_GL_RED_SIZE,1,
- GDK_GL_GREEN_SIZE,1,
- GDK_GL_BLUE_SIZE,1,
- GDK_GL_DOUBLEBUFFER,
- GDK_GL_NONE
+ GGLA_RGBA,
+ GGLA_RED_SIZE,1,
+ GGLA_GREEN_SIZE,1,
+ GGLA_BLUE_SIZE,1,
+ GGLA_DOUBLEBUFFER,
+ GGLA_NONE
};
#ifdef FULLSCREEN_MESA_3DFX
@@ -870,7 +870,7 @@ int main(int argc, char **argv)
gtk_init(&argc, &argv);
/* Check if OpenGL (GLX extension) is supported. */
- if (gdk_gl_query() == FALSE) {
+ if (ggla_query() == FALSE) {
g_print("OpenGL not supported\n");
return 0;
}
@@ -892,7 +892,7 @@ int main(int argc, char **argv)
/* Create new OpenGL widget. */
- glarea = GTK_WIDGET(gtk_gl_area_new(attrlist));
+ glarea = GTK_WIDGET(ggla_widget_new(attrlist));
/* Events for widget must be set before X Window is created */
gtk_widget_set_events(GTK_WIDGET(glarea),
GDK_EXPOSURE_MASK|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]