Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/Core/OOPolygonSprite.m
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ - (BOOL) loadPolygons:(NSArray *)dataArray outlineWidth:(float)outlineWidth
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, (_GLUfuncptr) TessBeginCallback);
gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, (_GLUfuncptr) TessVertexCallback);
gluTessCallback(tesselator, GLU_TESS_END_DATA, (_GLUfuncptr) TessEndCallback);
gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, (_GLUfuncptr) ErrorCallback);
gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, (_GLUfuncptr) TessCombineCallback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and all the above (_GLUfuncptr) casts break the Windows build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to a Windows machine to test on. I was hoping there would be build actions set up here so that I could get some results from other platforms. Can you share the errors it produces?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. The error is this:

Compiling file src/Core/OOMeshToOctreeConverter.m ... src/Core/OOPolygonSprite.m: In function '-[OOPolygonSprite loadPolygons:outlineWidth:]': src/Core/OOPolygonSprite.m:286:52: error: '_GLUfuncptr' undeclared (first use in this function) src/Core/OOPolygonSprite.m:286:52: note: each undeclared identifier is reported only once for each function it appears in src/Core/OOPolygonSprite.m:286:65: error: expected ')' before 'TessBeginCallback' src/Core/OOPolygonSprite.m:287:66: error: expected ')' before 'TessVertexCallback' src/Core/OOPolygonSprite.m:288:63: error: expected ')' before 'TessEndCallback' src/Core/OOPolygonSprite.m:289:65: error: expected ')' before 'ErrorCallback' src/Core/OOPolygonSprite.m:290:67: error: expected ')' before 'TessCombineCallback' src/Core/OOPolygonSprite.m:354:65: error: expected ')' before 'TessBeginCallback' src/Core/OOPolygonSprite.m:355:66: error: expected ')' before 'TessVertexCallback' src/Core/OOPolygonSprite.m:356:63: error: expected ')' before 'TessEndCallback' src/Core/OOPolygonSprite.m:357:65: error: expected ')' before 'ErrorCallback' src/Core/OOPolygonSprite.m:358:67: error: expected ')' before 'TessCombineCallback' src/Core/OOPolygonSprite.m: At top level: src/Core/OOPolygonSprite.m:657:22: warning: 'TessBeginCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:669:22: warning: 'TessVertexCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:758:22: warning: 'TessCombineCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:765:22: warning: 'TessEndCallback' defined but not used [-Wunused-function] src/Core/OOPolygonSprite.m:777:22: warning: 'ErrorCallback' defined but not used [-Wunused-function] make[3]: *** [obj.win.spk/oolite.obj/OOPolygonSprite.m.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [internal-objc_program-all_] Error 2 make[1]: *** [oolite.all.objc-program.variables] Error 2 make: *** [internal-all] Error 2

_GLUfuncptr is not defined in the Windows headers.


gluTessBeginPolygon(tesselator, &polygonData);
SVGDumpBeginGroup(&polygonData, @"Fill");
Expand Down Expand Up @@ -351,11 +351,11 @@ - (BOOL) loadPolygons:(NSArray *)dataArray outlineWidth:(float)outlineWidth
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, (_GLUfuncptr) TessBeginCallback);
gluTessCallback(tesselator, GLU_TESS_VERTEX_DATA, (_GLUfuncptr) TessVertexCallback);
gluTessCallback(tesselator, GLU_TESS_END_DATA, (_GLUfuncptr) TessEndCallback);
gluTessCallback(tesselator, GLU_TESS_ERROR_DATA, (_GLUfuncptr) ErrorCallback);
gluTessCallback(tesselator, GLU_TESS_COMBINE_DATA, (_GLUfuncptr) TessCombineCallback);
gluTessProperty(tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE);

gluTessBeginPolygon(tesselator, &polygonData);
Expand Down