I tried using
floatbuffer.put(float[]);
but since I process more than 200 squares, all with different texture coordinates, which are updated every frame, my drops drop sharply and the game gets too far away for liquid.
y thought that the method mentioned on badlogicgames.com, oh, instead uses floatbuffer, uses intbuffer, but is the same as the slow one at the time of the put method from the buffer.
So how can I update all my floatbuffers with better performance?
EDIT: I solved the problem, the put method itself is not slow, the problem is that a new float is initialized for each floatbuffer, instead I just change the value of each element contained in the floatarray, and this avoids many GC actions. Well, I think.
source share