From 3431a57d2edcda77151d678ed10079c565d623aa Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sun, 11 Dec 2011 23:36:53 +0000 Subject: [PATCH] Update teapot example --- examples/plugin/teapot.c | 4 +++- src/plugins/Makefile.am | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) 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: -- 2.43.2