Moving data from JVM to native level.

Hi,

OK, lets say we have 1000 objects and all those must be moved to native layer when doing OpenGL stuff on native side.

1: I use one JOGL/JNI command for each object. That results 1000 separate calls through JNI.

2: I put all those objects into array (new Object[1000]) and use only one JNI call to move that array to native side.

In both cases there are almost the same amout of real data moved to native side. Which one is faster, 1 or 2?

[quote]2: I put all those objects into array (new Object[1000]) and use only one JNI call to move that array to native side.
[/quote]
JOGL already does this with buffers and the number of objects will depend on your memory.