which method...

Sorry if this topic has been raised before but when reading this thread http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1089108472;start=0#0 Cas said

[quote]methods which were designed for performance in C such as glVertex3fv which are actually vastly slower in Java
[/quote]
So I know there are the f/fv/fv(buffer) etc but which is the “best” way pass parameters to the methods if the array version is so bad in java?

suspects that some reading on the topic of buffers is nescessary in the near future


Eta-Beta-Pi

For any large chunk of data, direct ByteBuffers. For any small bits of data (like a single vertex or colour), just on the stack. For ease of use, Java arrays - though they tend to be slower than buffers for various reasons. We don’t use Java arrays in LWJGL because the library is all about the minimum required cruft for maximum performance.

Cas :slight_smile: