rewind() but when

Hello,

i’m poting my game engine from jogl1.1.1 to jsr231 and my question is when should i use the rewind method? allways?
when want to use buffers to fill model matrices? or when i want to use glsl codes?
call it once or every time, when i modeify the buffer’s content?
what does the rewind make exactly? and the order methods?

Thanks…

The basic rule is that the positions of Buffers are now significant when computing the pointer to be passed down to OpenGL. If you’re porting pre-JSR-231 JOGL code and used to modify the positions of your Buffers (not every application uses the relative put() methods on the Buffer classes), then it would be correct to rewind() your Buffers before outgoing OpenGL calls which take these Buffers. You may also be able to get away with either significantly fewer or no rewinds.