IntBuffer buffer = BufferUtils.createIntBuffer(RAND_AMOUNT) Java code where I load the uniform: final int RAND_AMOUNT = 50 The values stored in the java arrays generated are correct. The location of the uniform variable is 0, therefore it is correctly loaded. According to the documentation ( (int,int%5B%5D) ), the function glUniform1iv exists and does what I need, but when I try it Eclipse tells me it doesn't exist in the class GL20, both when using an int or an IntBuffer, same for glUniform1fv. I tried copy-pasting the "arrayOfInts" example to try and isolate the problem, changing everything to be ints, but I still only get zeros shader-side. I have been following the tutorial on LWJGL's website ( ) to try to send an array of random floats to my fragment shader, but every value in the shader was 0.
0 Comments
Leave a Reply. |