]> Pileus Git - grits/commitdiff
Update teapot example
authorAndy Spencer <andy753421@gmail.com>
Sun, 11 Dec 2011 23:36:53 +0000 (23:36 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 11 Dec 2011 23:36:53 +0000 (23:36 +0000)
examples/plugin/teapot.c
src/plugins/Makefile.am

index 90ad2e265c7a8f3c294432b8d981327690d62775..1de1230fc52e1ff7bec6e41484276d990885df2d 100644 (file)
@@ -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;
 }
index ff5ee2dbaa055ee11ded2bea7dcf3ba1a2ea010a..d713c3580ec5a38b8548b980a36c478a0426125d 100644 (file)
@@ -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: