Bug 763

Summary: GL2GL3.glCreateShaderProgramv has bad signature and does not work
Product: [JogAmp] Jogl Reporter: Julien <julien.carlos>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
jogl 4e225341fa11769c4da0825a3b5eb37464a732ef
Workaround: ---

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
fixed