使用gluTessCallback()时类型转换错误

时间:2018-10-05 16:04:36

标签: opengl

   void extrudeSolidFromPolygon(GLfloat data[][2], unsigned int dataSize,
                 GLdouble thickness, GLuint side, GLuint edge, GLuint whole)
  { 
     static GLUtriangulatorObj *tobj = NULL;
     GLdouble vertex[3], dx, dy, len;
      if (tobj == NULL)
  {
    tobj = gluNewTess();  
    gluTessCallback(tobj, GLU_BEGIN, glBegin);
    gluTessCallback(tobj, GLU_VERTEX, glVertex2fv);  
    gluTessCallback(tobj, GLU_END, glEnd);
  }

当我运行完整代码时,此部分显示错误...

C:\Users\Raju\Desktop\bike\main.cpp|59|error: invalid conversion from 'void (__attribute__((__stdcall__)) *)(const GLfloat*) {aka void (__attribute__((__stdcall__)) *)(const float*)}' to '_GLUfuncptr {aka void (__attribute__((__stdcall__)) *)()}' [-fpermissive]|
error:   initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, _GLUfuncptr)' [-fpermissive]

0 个答案:

没有答案