In the ShapeAtomPeers around line 630 there is a buffer splicing I don't get.
LWJGLs ShapeAtomPeer (624): IntBuffer subBuffer = ( (IntBuffer)igsa.getIndexData().getBuffer().position( i0 ) ).slice();
subBuffer.limit( stripVertexCounts[ s ] ); // added to fix the strange triangles in the terrain test
GL11.glDrawElements( mode, subBuffer );
I added the new limit there to fix the triangle test, but before that, the slice was completely unaltered.
If a slice at all, shouldn't this be
IntBuffer subBuffer = ( (IntBuffer)igsa.getIndexData().getBuffer()).slice();
subBuffer.position( i0 )
subBuffer.limit( stripVertexCounts[ s ] );
GL11.glDrawElements( mode, subBuffer );
to make sense?
But afaik a slice call creates a new (shared) Buffer erverytime, so wouldn't be
IntBuffer buffer = (IntBuffer) igsa.getIndexData().getBuffer();
int position = buffer.position();
int limit = buffer.limit();
buffer.position( i0 );
buffer.limit( stripVertexCounts[s] );
GL11.glDrawElements( mode, buffer );
buffer.limit( limit );
buffer.position( position );
a more effective implementation? It seems to be working, but maybe I am missing something, so I did not commit this yet.
Any Feedback? (Marvin?

)