From: Andy Spencer Date: Sat, 15 Dec 2012 06:54:18 +0000 (+0000) Subject: Update examples X-Git-Url: http://pileus.org/git/?p=grits;a=commitdiff_plain;h=8c7994f58481044abf01f706accb734340ab6971 Update examples - Fix crash in teapot plugin - Use direct rendering in gl example --- diff --git a/examples/gl/gl.c b/examples/gl/gl.c index 378fd9a..ca7811f 100644 --- a/examples/gl/gl.c +++ b/examples/gl/gl.c @@ -98,7 +98,7 @@ gpointer setup(GtkWidget *widget) GLX_DEPTH_SIZE, 1, None}; XVisualInfo *xvinfo = glXChooseVisual(xdisplay, nscreen, attribs); - GLXContext context = glXCreateContext(xdisplay, xvinfo, 0, False); + GLXContext context = glXCreateContext(xdisplay, xvinfo, 0, True); /* Fix up colormap */ GdkVisual *visual = gdk_x11_screen_lookup_visual(screen, xvinfo->visualid); diff --git a/examples/gl/mkfile b/examples/gl/mkfile index 5470441..ecb6803 100644 --- a/examples/gl/mkfile +++ b/examples/gl/mkfile @@ -8,12 +8,12 @@ default:V: run # GtkGLExt #CPPFLAGS=-DSYS_GTKGLEXT #CFLAGS=`{pkg-config --cflags gtkglext-1.0} --std=c99 -#LIBS=-`{pkg-config --libs gtkglext-1.0} +#LIBS=`{pkg-config --libs gtkglext-1.0} -lm #default:V: run # X11 #CPPFLAGS=-DSYS_X11 -#LIBS=-lGL +#LIBS=-lGL -lm #default:V: run # Mac OSX diff --git a/examples/plugin/teapot.c b/examples/plugin/teapot.c index 1de1230..1aaa234 100644 --- a/examples/plugin/teapot.c +++ b/examples/plugin/teapot.c @@ -120,8 +120,6 @@ static void grits_plugin_teapot_dispose(GObject *gobject) static void grits_plugin_teapot_class_init(GritsPluginTeapotClass *klass) { g_debug("GritsPluginTeapot: class_init"); - int argc = 1; char *argv[] = {"", NULL}; - glutInit(&argc, argv); GObjectClass *gobject_class = (GObjectClass*)klass; gobject_class->dispose = grits_plugin_teapot_dispose; }