[grits] Update examples
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grits] Update examples
- Date: Sat, 15 Dec 2012 08:53:07 +0000 (UTC)
commit 8c7994f58481044abf01f706accb734340ab6971
Author: Andy Spencer <andy753421 gmail com>
Date: Sat Dec 15 06:54:18 2012 +0000
Update examples
- Fix crash in teapot plugin
- Use direct rendering in gl example
examples/gl/gl.c | 2 +-
examples/gl/mkfile | 4 ++--
examples/plugin/teapot.c | 2 --
3 files changed, 3 insertions(+), 5 deletions(-)
---
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]