Bug 1263

Summary: glDrawElements missing a Buffer param in GL.java
Product: [JogAmp] Jogl Reporter: vaxquis <spamove>
Component: coreAssignee: Sven Gothel <sgothel>
Status: UNCONFIRMED ---    
Severity: normal CC: gouessej, sgothel
Priority: P4    
Version: tbd   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

Description vaxquis 2015-11-03 15:41:04 CET
as per https://www.opengl.org/sdk/docs/man/html/glDrawElements.xhtml , glDrawElements is present in all GL versions >= 2.0 ; it's also present in GL.java interface, yet with a faulty signature - since the C method has
	GLenum mode,
 	GLsizei count,
 	GLenum type,
 	const GLvoid * indices
as parameters, it would follow that the GL interface should have 
        int mode,
        int count,
        int type,
        Buffer indices
(see e.g. https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GLES2.html , https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GL2ES1.html), yet GL (https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GL.html#glDrawElements(int, int, int, long) has only a method with
        int mode,
        int count,
        int type,
        long indices_buffer_offset
as its signature, with no Buffer overload.

I assume the proper signatures would've been
        int mode,
        int count,
        int type,
        int[] indices_buffer,
        long indices_buffer_offset
&
        int mode,
        int count,
        int type,
        Buffer indices

NB I suppose it's some kind of obscure GlueGen artifact.
Comment 1 vaxquis 2015-11-03 16:23:37 CET
as a side note: there should probably be either int/short/byte overload versions for arrays and/or a Buffer one (glDrawElements can accept all three types per spec).