I need to pass texture data (bytes) from Native side to Java. What is the best way to do it, performance wise?
The only way I know would be to create an array of bytes and return it to Java. But that kinda seems slow to me.
EDIT-
I found this page while googling
Which is faster?
Create temp array of jbyte, do env->SetByteArrayRegion
Or just env->SetArrayObject(obj, int index) (Or something like that)
EDIT–
Is there any mechanism for printing error in JNI?