我使用以下方法注册了 CALLBACK:
gluTessCallback(tess, GLU_TESS_COMBINE, (GLvoid(*)()) &scbCombine);
scbCombine
直接在同一个.cpp
文件中的函数在哪里:
void CALLBACK scbCombine(const double newVertex[3], const double *neighborVertex[4], const float neighborWeight[4], double **outData)
{
instanceMDC->cbCombine(newVertex, neighborVertex, neighborWeight, outData);
printf("scbCombine \n");
}
当我使用测试它时,它"scbCombine \n"
会打印在控制台中!!!然后在调用 CALLBACK 函数后,tesselator 调用错误回调并显示消息:“需要组合回调”(!!)
我的应用程序中已经有另外两个镶嵌器,它们工作正常。但最后一个没有。我尽可能将这一个的代码与另一个的代码进行比较。但我不明白为什么它不起作用。
cbCombine
方法(开头没有“s”)是这样的:
void MyClass::cbCombine(const double newVertex[3], const double *neighborVertex[4], const float neighborWeight[4], double **outData)
{
outData = 0;
}
但是设置outData
为零不可能是问题:我已经用其他镶嵌器之一做到了这一点......
我快疯了......我已经花了几个小时来解决这个问题
谢谢