Given this is a sticky topic, I thought I would summarize the two big things I've learned about using Buffers in JSR-231 programs:
- Use BufferUtils method to make your buffers. This ensures they are:
- The right size (i.e, size of, say, float times array count)
- Direct Buffers instead of Indirect
- The right byte order (ByteOrder.naturalOrder())
[li]rewind() your Buffers before submitting them to glVertexPointer(), glNormalPointer(), etc.[/li]
[/list]
For me, the incorrect ByteOrder was producing the VM crash that was described in starting this thread.
Keith