code generation help & question

Hi all,

I know a large portion of jogl is generated from opengl spec. What I wonder: some functions recieve an array as a parameter, and also requires length of array and offset. for example:

float[] parameters = new float[] { 1, 1, 1 };

gl.glUniform3f(someUniform, 3, parameters, 0);

can one also generate short-cut functions for all functions with an array input, without length and offset, and can simply be used as:

gl.glUniform3f(someUniform, parameters);

Thanks,
Ozgur

In jogl there are two variations to methods like that: one that takes an array followed by an int offset into the array; a second one that takes an nio buffer that relies on the buffer’s position and limit for the byte data.

In your case with glUniform3f, the length/count argument is part of the opengl spec and should likely not be taken out to make a shortcut function.