summarylogtreecommitdiffstats
path: root/patch.patch
blob: 016935e99ab76e98b4f60ca48e245a791f4c167d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/src/Core/OOPolygonSprite.m b/src/Core/OOPolygonSprite.m
index 5ada443e..216d67f1 100644
--- a/src/Core/OOPolygonSprite.m
+++ b/src/Core/OOPolygonSprite.m
@@ -115,6 +115,9 @@ static void APIENTRY TessEndCallback(void *polygonData);
 
 static void APIENTRY ErrorCallback(GLenum error, void *polygonData);
 
+// this is needed to maintain compatibility with GCC 14+
+typedef GLvoid (*TessFuncPtr)();
+
 
 @implementation OOPolygonSprite
 
@@ -283,11 +286,11 @@ static void APIENTRY ErrorCallback(GLenum error, void *polygonData);
 	dataArray = DataArrayToPoints(&polygonData, dataArray);
 	
 	/*** Tesselate polygon fill ***/
-	gluTessCallback(tesselator, GLU_TESS_BEGIN_DATA, TessBeginCallback);
-	gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, TessVertexCallback);
-	gluTessCallback(tesselator, GLU_TESS_END_DATA, TessEndCallback);
-	gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, ErrorCallback);
-	gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, TessCombineCallback);
+	gluTessCallback(tesselator, GLU_TESS_BEGIN_DATA, (TessFuncPtr)TessBeginCallback);
+	gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, (TessFuncPtr)TessVertexCallback);
+	gluTessCallback(tesselator, GLU_TESS_END_DATA, (TessFuncPtr)TessEndCallback);
+	gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, (TessFuncPtr)ErrorCallback);
+	gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, (TessFuncPtr)TessCombineCallback);
 	
 	gluTessBeginPolygon(tesselator, &polygonData);
 	SVGDumpBeginGroup(&polygonData, @"Fill");
@@ -351,11 +354,11 @@ static void APIENTRY ErrorCallback(GLenum error, void *polygonData);
 	polygonData.generatingOutline = YES;
 #endif
 	
-	gluTessCallback(tesselator, GLU_TESS_BEGIN_DATA, TessBeginCallback);
-	gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, TessVertexCallback);
-	gluTessCallback(tesselator, GLU_TESS_END_DATA, TessEndCallback);
-	gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, ErrorCallback);
-	gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, TessCombineCallback);
+	gluTessCallback(tesselator, GLU_TESS_BEGIN_DATA, (TessFuncPtr)TessBeginCallback);
+	gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, (TessFuncPtr)TessVertexCallback);
+	gluTessCallback(tesselator, GLU_TESS_END_DATA, (TessFuncPtr)TessEndCallback);
+	gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, (TessFuncPtr)ErrorCallback);
+	gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, (TessFuncPtr)TessCombineCallback);
 	gluTessProperty(tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE);
 	
 	gluTessBeginPolygon(tesselator, &polygonData);