should i pass arrays or bytebuffers?
I've noticed that in lwjgl, the functions which would require an array in opengl require bytebuffers or floatbuffers in lwjgl. is this for speed?
i need to be able to pass an array to a function i've written, and return one.
what would be faster, using a jbytearray, or converting my array to a buffer, sending it, having the method return a buffer, and converting it to an array?
Re: should i pass arrays or bytebuffers?
If you will try to passing array or buffer both means passing a object to a function and both will take same time. but if you will convert an array to buffer and send it and again get the buffer and convert it into the array, this will take time so now it depends upon you whatever you like.