Bug 1263 - glDrawElements missing a Buffer param in GL.java
Summary: glDrawElements missing a Buffer param in GL.java
Status: UNCONFIRMED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: tbd
Hardware: All all
: P4 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2015-11-03 15:41 CET by vaxquis
Modified: 2015-11-04 10:29 CET (History)
2 users (show)

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).