[grits] Update teapot example



commit 3431a57d2edcda77151d678ed10079c565d623aa
Author: Andy Spencer <andy753421 gmail com>
Date:   Sun Dec 11 23:36:53 2011 +0000

    Update teapot example

 examples/plugin/teapot.c |    4 +++-
 src/plugins/Makefile.am  |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/examples/plugin/teapot.c b/examples/plugin/teapot.c
index 90ad2e2..1de1230 100644
--- a/examples/plugin/teapot.c
+++ b/examples/plugin/teapot.c
@@ -59,7 +59,7 @@ static void expose(GritsCallback *callback, GritsOpenGL *opengl, gpointer _teapo
 	glRotatef(teapot->rotation, 1, 1, 0);
 	glColor4f(0.9, 0.9, 0.7, 1.0);
 	glDisable(GL_CULL_FACE);
-	glutSolidTeapot(2.5);
+	glutSolidTeapot(0.5);
 }
 
 
@@ -120,6 +120,8 @@ 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;
 }
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index ff5ee2d..d713c35 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -23,6 +23,7 @@ noinst_LTLIBRARIES  = teapot.la
 teapot_la_SOURCES   = \
 	$(top_srcdir)/examples/plugin/teapot.c \
 	$(top_srcdir)/examples/plugin/teapot.h
+teapot_la_LDFLAGS   = $(AM_LDFLAGS) -lglut -rpath $(libdir) # I hate you libtool
 endif
 
 test:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]