Re: glVertexAttribIPointer(int, int, int, int, long)?
Posted by Wade Walker on Jun 09, 2011; 1:01am
URL: https://forum.jogamp.org/glVertexAttribIPointer-int-int-int-int-long-tp3034571p3042174.html
Ah, I see what you mean now. It might be that gluegen is doing the wrong thing for this particular use of type GLVoid *. Usually pointer types need to be Buffers of some kind in Java, but the spec does seem to imply that in this case, you're supposed to just cast an int to (GLVoid *) and pass that in.
Looking at the JNI code for these functions, it looks like a Buffer of null will be passed to the C function as a zero offset, but there's no way to get a non-zero offset with the current JNI code. You might want to enter a bug report on this one so we'll know that we need to tell gluegen to treat GLVoid * differently in this case.
I think there is some way to override the JNI code generation on a per-function basis in gluegen, but I haven't looked at that part of the codebase. Maybe Sven or Michael can provide some insight here.