BufferUtils question

I was going through the tutorials available on the wiki ( http://www.jmonkeyengine.com/wiki/doku.php?id=starter:hello_keyinput) and I have a question about the use of BufferUtils class when creating Trimesh.  Why exactly do you need to create a nio buffer when feeding vector info to the trimesh.  Please forgive if the question does not make sense, I am somewhat new to 3D programming.  If anyone has any suggestion on places that might help me understand 3D concepts like normals, and translations please inform.

try this for starters

Search for good book …


We are using direct buffers because they have a guaranteed position in memory, which is something required when sending the data to your hardware for processing.

I don’t know why but I forgot that buffers are used to read and write to memory as well as any other external to Java.  Thankyou this make sense now.

As for the books, I know about the red and blue book but I wish that there was an equivalent with java examples using JOGL or LWJGL.  I have a hard time with the traditional OpenGL books due to my lack in c++ knowledge.  I will continue to search around.  I did find this http://ak.kiet.le.googlepages.com/theredbookinjava.html but no source.

OpenGL is the same in C++ and Java. I guess the main issue is that the code in those books uses techniques that are only relevant to C++ which don't work in Java. I found that using internet sources to learn OpenGL is much easier.