String:
glDebugMessageCallbackARB(&DebugOutputCallback, NULL);
Give me error:
Description Resource Path Location Type invalid conversion from 'void ( attribute (( stdcall )) )(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar , GLvoid*) {aka void ( attribute (( stdcall )) )(unsigned int, unsigned int, unsigned int, unsigned int, int, const char , void*)}' to 'GLDEBUGPROCARB {aka void ( attribute (( stdcall )) )(unsigned int, unsigned int, unsigned int, unsigned int, int, const char , const void*)}' [-fpermissive]
Please tell me what wrong?
The compiler is trying to tell you that the signature of your callback function should be
void (*)(GLenum, GLenum, GLuint, GLenum, GLsizei, GLchar, GLvoid const*)
The last parameter of the callback you are passing is GLvoid*
, when it should be GLvoid const*
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.