summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-09-24 08:40:34 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-09-24 08:40:34 (GMT)
commitdfd5a373905f98be1b5b65b01981d9f9b7ec56df (patch)
tree8637301b67c25abcbb82c42331451658e49eee5d
parentd216657a2297bfa085a8baeda3fda5d7cee432fe (diff)
Stefan Farthofer:
Fixed glutess calls for win32 git-svn-id: http://svn.clifford.at/openscad/trunk@93 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r--dxftess.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/dxftess.cc b/dxftess.cc
index ba62329..223ce1b 100644
--- a/dxftess.cc
+++ b/dxftess.cc
@@ -18,6 +18,12 @@
*
*/
+#ifdef WIN32
+# define STDCALL __stdcall
+#else
+# define STDCALL
+#endif
+
#define INCLUDE_ABSTRACT_NODE_DETAILS
#include "openscad.h"
@@ -39,7 +45,7 @@ static int tess_count;
static QVector<tess_triangle> tess_tri;
static GLdouble *tess_p1, *tess_p2;
-static void tess_vertex(void *vertex_data)
+static void STDCALL tess_vertex(void *vertex_data)
{
GLdouble *p = (double*)vertex_data;
#if 0
@@ -89,7 +95,7 @@ static void tess_vertex(void *vertex_data)
tess_count++;
}
-static void tess_begin(GLenum type)
+static void STDCALL tess_begin(GLenum type)
{
#if 0
if (type == GL_TRIANGLE_FAN) {
@@ -106,12 +112,12 @@ static void tess_begin(GLenum type)
tess_type = type;
}
-static void tess_end(void)
+static void STDCALL tess_end(void)
{
/* nothing to be done here */
}
-static void tess_error(GLenum errno)
+static void STDCALL tess_error(GLenum errno)
{
PRINTF("GLU tesselation error %d!", errno);
}
@@ -158,10 +164,10 @@ void dxf_tesselate(PolySet *ps, DxfData *dxf, double rot, bool up, double h)
{
GLUtesselator *tobj = gluNewTess();
- gluTessCallback(tobj, GLU_TESS_VERTEX, (GLvoid(*)())&tess_vertex);
- gluTessCallback(tobj, GLU_TESS_BEGIN, (GLvoid(*)())&tess_begin);
- gluTessCallback(tobj, GLU_TESS_END, (GLvoid(*)())&tess_end);
- gluTessCallback(tobj, GLU_TESS_ERROR, (GLvoid(*)())&tess_error);
+ gluTessCallback(tobj, GLU_TESS_VERTEX, (void(STDCALL *)())&tess_vertex);
+ gluTessCallback(tobj, GLU_TESS_BEGIN, (void(STDCALL *)())&tess_begin);
+ gluTessCallback(tobj, GLU_TESS_END, (void(STDCALL *)())&tess_end);
+ gluTessCallback(tobj, GLU_TESS_ERROR, (void(STDCALL *)())&tess_error);
tess_tri.clear();
QList<tess_vdata> vl;
contact: Jan Huwald // Impressum