public void gluTessCallback(int which, GLUtessellatorCallback aCallback) { switch (which) { case GLU_TESS_BEGIN: callBegin = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_BEGIN_DATA: callBeginData = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_EDGE_FLAG: callEdgeFlag = aCallback == null ? NULL_CB : aCallback; /* If the client wants boundary edges to be flagged, * we render everything as separate triangles (no strips or fans). */ flagBoundary = aCallback != null; return; case GLU_TESS_EDGE_FLAG_DATA: callEdgeFlagData = callBegin = aCallback == null ? NULL_CB : aCallback; /* If the client wants boundary edges to be flagged, * we render everything as separate triangles (no strips or fans). */ flagBoundary = (aCallback != null); return; case GLU_TESS_VERTEX: callVertex = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_VERTEX_DATA: callVertexData = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_END: callEnd = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_END_DATA: callEndData = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_ERROR: callError = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_ERROR_DATA: callErrorData = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_COMBINE: callCombine = aCallback == null ? NULL_CB : aCallback; return; case GLU_TESS_COMBINE_DATA: callCombineData = aCallback == null ? NULL_CB : aCallback; return; // case GLU_TESS_MESH: // callMesh = aCallback == null ? NULL_CB : aCallback; // return; default: callErrorOrErrorData(GLU_INVALID_ENUM); return; } }