I recently switched from JOGL to LWJGL and I'm currently porting my engine.
Sadly I encountered the following problem:
Creating 16 buffer
16 capacity, 0 remaining, 16 position, .. flipping..
16 capacity, 16 remaining, 0 position
Exception in thread "main" java.lang.IllegalArgumentException: Number of remaining buffer elements is 4, must be at least 16. Because at most 16 elements can be returned, a buffer with at least 16 elements is required, regardless of actual returned element count
Please note the debug statements, where i create a floatbuffer from my camera matrix. Nonetheless, this error keeps occuring. As far as google told me, this error was supposed to be resolved by flipping the floatbuffer, but i already did so:
System.out.println("Creating "+(entity.getMatrix().get().length)+" buffer");
FloatBuffer floatBuffer = BufferUtils.createFloatBuffer(entity.getMatrix().get().length);
System.out.println(floatBuffer.capacity()+" capacity, "+ floatBuffer.remaining()+" remaining, "+ floatBuffer.position()+" position, .. flipping..");
System.out.println(floatBuffer.capacity()+" capacity, "+ floatBuffer.remaining()+" remaining, "+ floatBuffer.position()+" position");
Thank you for your help.