Bug 763 - GL2GL3.glCreateShaderProgramv has bad signature and does not work
Summary: GL2GL3.glCreateShaderProgramv has bad signature and does not work
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: All all
: --- normal
Assignee: Sven Gothel
Depends on:
Reported: 2013-06-24 14:38 CEST by Julien
Modified: 2013-07-05 05:52 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
jogl 4e225341fa11769c4da0825a3b5eb37464a732ef
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Julien 2013-06-24 14:38:07 CEST
glCreateShaderProgramv has the following signature in C:
glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);

It is very similar to the glShaderSource command:
glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);

In Java glCreateShaderProgram takes the following arguments:
glCreateShaderProgramv(int type, int count, PointerBuffer strings)

-> I can't find a way to pass the shader string as a PointBuffer. I get a GL4bcImpl implementation on a GLCanvas where I've tried to use both an OpenGL 4 core and compatilibty contexts. I have a Quadro K3000M on Windows 7 64 bits, so it should work. I've tried a lot of different things, most of them are crashing the application. 

glShaderSource has a much nicer Java interface:
glShaderSource(int shader, int count, String[] string, IntBuffer length)

-> glCreateShaderProgram should really work the same way. So I would expect to have an interface like:
glCreateShaderProgram(int type, int count, String[] strings)
Comment 1 Sven Gothel 2013-06-25 18:28:26 CEST
agreed - thank you!
Comment 2 Sven Gothel 2013-07-05 05:52:24 CEST