Before you spam “its a thing you need to send data to openGL” i know that.
a direct floatbuffer apparently speeds up native function calls, why? What is the difference between a float[] and a FloatBuffer under the hood?
also, I did a test in filling float[10000000]s and float buffers using different methods.
doing
for(int i = 0; i < 10000000; i++)
{
array[i] = .5f;
}
took 47 ms
System.arraycopy took >1 ms
FloatBuffer.put(float[]) took 15ms
FloatBuffer.put(FloatBuffer) took 15ms
[edit]
re-did test with an array that is 10x as big, made the time diff more noticible