[grits] Cast function pointers for gluTessCallback
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grits] Cast function pointers for gluTessCallback
- Date: Thu, 16 Feb 2012 23:18:44 +0000 (UTC)
commit 109c5476a68de3a7a3ace77ecc6d30e842dd004f
Author: Andy Spencer <andy753421 gmail com>
Date: Sun Feb 12 07:22:08 2012 +0000
Cast function pointers for gluTessCallback
The glu type does not work on Mac OSX, and an un-casted version does not
work in Debian.. Hopefully casting it to GCallback (void-void function)
will work both places..
src/objects/grits-poly.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/objects/grits-poly.c b/src/objects/grits-poly.c
index c2c9923..357afae 100644
--- a/src/objects/grits-poly.c
+++ b/src/objects/grits-poly.c
@@ -31,9 +31,9 @@ static void grits_poly_tess(gdouble (**points)[3])
{
//g_debug("GritsPoly: tess");
GLUtesselator *tess = gluNewTess();
- gluTessCallback(tess, GLU_TESS_BEGIN, glBegin);
- gluTessCallback(tess, GLU_TESS_VERTEX, glVertex3dv);
- gluTessCallback(tess, GLU_TESS_END, glEnd);
+ gluTessCallback(tess, GLU_TESS_BEGIN, G_CALLBACK(glBegin));
+ gluTessCallback(tess, GLU_TESS_VERTEX, G_CALLBACK(glVertex3dv));
+ gluTessCallback(tess, GLU_TESS_END, G_CALLBACK(glEnd));
for (int pi = 0; points[pi]; pi++) {
gluTessBeginPolygon(tess, NULL);
gluTessBeginContour(tess);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]