字符串:
glDebugMessageCallbackARB(&DebugOutputCallback, NULL);
给我错误:
描述资源路径位置输入来自' void的无效转换 (属性(( stdcall )))(GLenum,GLenum,GLuint,GLenum, GLsizei,const GLchar ,GLvoid *){又无效 (属性(( stdcall )))(unsigned int,unsigned int,unsigned int,unsigned int,int,const char ,void *)}'到了' GLDEBUGPROCARB {又名 void( attribute (( stdcall )))(unsigned int,unsigned int, unsigned int,unsigned int,int,const char ,const void *)}' [-fpermissive]
请告诉我有什么不对?
答案 0 :(得分:1)
编译器试图告诉您回调函数的签名应为
void (*)(GLenum, GLenum, GLuint, GLenum, GLsizei, GLchar, GLvoid const*)
您传递的回调的最后一个参数是GLvoid*
,它应该是GLvoid const*
。