Hey ho, I am crashing the JVM (or more precisely, the native code crashes the JVM). Either I am failing to understand something here, or we got a bug.
WHAT AM I DOING? Actually not much, I have a compiled shader (vertex and fragment), represented by the integer program in the code below. And then, I am trying to get its variables...
int numberOfUniformVars = glGetProgrami(program, GL_ACTIVE_UNIFORMS);
for (int i = 0; i < numberOfUniformVars; i++) {
String name = glGetActiveUniform(program, i, /** give me the name of the uniform at index for program */
/* since I am actually only interested in the name, so just create
* some buffers (which store value and type) that we do not use later */
IntBuffer.allocate(1), IntBuffer.allocate(1));
int location = glGetUniformLocation(program, name);
[...do other stuff...]
}
WHAT CRASHES? My call to glGetActiveUniform, at this point I am actually only interested in the name so maybe there is some LWJGL 2 to 3 migration bug still present in my code? I have attached a crashlog.
WHAT IS MY SETUP? I am using a pretty recent OpenJDK on my Xubuntu Linux, GTX680. LWJGL is 3.0.0b (from Maven Repository).
Am I doing something wrong or is there a bug present?