Login  Register

Updating glext.h confuses gluegen with function pointer GLDEBUGPROCARB

Posted by kotloft on Feb 23, 2013; 11:32am
URL: https://forum.jogamp.org/Updating-glext-h-confuses-gluegen-with-function-pointer-GLDEBUGPROCARB-tp4028327.html

Hi all, i decide to build JOGL with the updated glext.h. With all unnamed structs like _cl_event, _cl_context, __GLSync etc (which are commented out in jogl official glext.h) deleted, things are still not going well. I get this:
java.lang.RuntimeException: Error while generating bindings for "void glDebugMessageCallback(void (*callback)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *  message, GLvoid *  userParam), const void *  userParam);"
	at com.jogamp.gluegen.JavaEmitter.generateMethodBindingEmitters(JavaEmitter.java:726)
	at com.jogamp.gluegen.procaddress.ProcAddressEmitter.generateMethodBindingEmittersImpl(ProcAddressEmitter.java:129)
	at com.jogamp.gluegen.procaddress.ProcAddressEmitter.generateMethodBindingEmitters(ProcAddressEmitter.java:116)
	at com.jogamp.gluegen.JavaEmitter.emitFunctions(JavaEmitter.java:417)
	at com.jogamp.gluegen.GlueGen.run(GlueGen.java:297)
	... 1 more
Caused by: java.lang.RuntimeException: Don't know how to convert pointer/array type "GLDEBUGPROCARB"
	at com.jogamp.gluegen.JavaEmitter.typeToJavaType(JavaEmitter.java:1293)
	at com.jogamp.gluegen.JavaEmitter.bindFunction(JavaEmitter.java:1718)
	at com.jogamp.gluegen.JavaEmitter.generateMethodBindingEmitters(JavaEmitter.java:651)
	... 5 more
for your ref, the definition of GLDEBUGPROCARB is
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
However, in the JOGL's glext.h, all functions and definitions related to GLDEBUGPROCARB are the same as mine. This makes me very confusing.

I hope someone who are experienced with GlueGen can give me some answers.

Thanks sincerely