42 #include "priorityq.h" 47 enum TessState {T_DORMANT, T_IN_POLYGON, T_IN_CONTOUR};
52 #define TESS_MAX_CACHE 100 69 void (* callError)(GLenum errnum);
85 void (* callCombine)(
double coords[3],
void* data[4],
86 GLfloat weight[4],
void** outData);
89 GLboolean flagBoundary;
90 GLboolean boundaryOnly;
94 void (* callBegin)(GLenum type);
95 void (* callEdgeFlag)(GLboolean boundaryEdge);
96 void (* callVertex)(
void* data);
97 void (* callEnd)(void);
102 GLboolean emptyCache;
107 void (* callBeginData)(GLenum type,
void* polygonData);
108 void (* callEdgeFlagData)(GLboolean boundaryEdge,
void* polygonData);
109 void (* callVertexData)(
void* data,
void* polygonData);
110 void (* callEndData)(
void* polygonData);
111 void (* callErrorData)(GLenum errnum,
void *polygonData);
112 void (* callCombineData)(
double coords[3],
void* data[4],
113 GLfloat weight[4],
void** outData,
121 void __gl_noBeginData(GLenum type,
void* polygonData);
122 void __gl_noEdgeFlagData(GLboolean boundaryEdge,
void* polygonData);
123 void __gl_noVertexData(
void* data,
void* polygonData);
124 void __gl_noEndData(
void* polygonData);
125 void __gl_noErrorData(GLenum errnum,
void* polygonData);
126 void __gl_noCombineData(
double coords[3],
void* data[4],
127 GLfloat weight[4],
void** outData,
130 #define CALL_BEGIN_OR_BEGIN_DATA(a) \ 131 if (tess->callBeginData != &__gl_noBeginData) \ 132 (*tess->callBeginData)((a),tess->polygonData); \ 133 else (*tess->callBegin)((a)); 135 #define CALL_VERTEX_OR_VERTEX_DATA(a) \ 136 if (tess->callVertexData != &__gl_noVertexData) \ 137 (*tess->callVertexData)((a),tess->polygonData); \ 138 else (*tess->callVertex)((a)); 140 #define CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA(a) \ 141 if (tess->callEdgeFlagData != &__gl_noEdgeFlagData) \ 142 (*tess->callEdgeFlagData)((a),tess->polygonData); \ 143 else (*tess->callEdgeFlag)((a)); 145 #define CALL_END_OR_END_DATA() \ 146 if (tess->callEndData != &__gl_noEndData) \ 147 (*tess->callEndData)(tess->polygonData); \ 148 else (*tess->callEnd)(); 150 #define CALL_COMBINE_OR_COMBINE_DATA(a,b,c,d) \ 151 if (tess->callCombineData != &__gl_noCombineData) \ 152 (*tess->callCombineData)((a),(b),(c),(d),tess->polygonData); \ 153 else (*tess->callCombine)((a),(b),(c),(d)); 155 #define CALL_ERROR_OR_ERROR_DATA(a) \ 156 if (tess->callErrorData != &__gl_noErrorData) \ 157 (*tess->callErrorData)((a),tess->polygonData); \ 158 else (*tess->callError)((a));