@ -1824,7 +1824,7 @@ public class OGLESShaderRenderer implements Renderer {
context . boundArrayVBO = bufId ;
context . boundArrayVBO = bufId ;
}
}
vb . getData ( ) . clear ( ) ;
vb . getData ( ) . rewind ( ) ;
Android22Workaround . glVertexAttribPointer ( loc ,
Android22Workaround . glVertexAttribPointer ( loc ,
vb . getNumComponents ( ) ,
vb . getNumComponents ( ) ,
@ -1935,7 +1935,7 @@ public class OGLESShaderRenderer implements Renderer {
count ) ;
count ) ;
* /
* /
} else {
} else {
indexData . clear ( ) ;
indexData . rewind ( ) ;
GLES20 . glDrawElements (
GLES20 . glDrawElements (
convertElementMode ( mesh . getMode ( ) ) ,
convertElementMode ( mesh . getMode ( ) ) ,
indexBuf . getData ( ) . limit ( ) ,
indexBuf . getData ( ) . limit ( ) ,
@ -2131,7 +2131,7 @@ public class OGLESShaderRenderer implements Renderer {
int vertCount = mesh . getVertexCount ( ) ;
int vertCount = mesh . getVertexCount ( ) ;
Buffer indexData = indexBuf . getData ( ) ;
Buffer indexData = indexBuf . getData ( ) ;
indexData . clear ( ) ;
indexData . rewind ( ) ;
if ( mesh . getMode ( ) = = Mode . Hybrid ) {
if ( mesh . getMode ( ) = = Mode . Hybrid ) {
int [ ] modeStart = mesh . getModeStart ( ) ;
int [ ] modeStart = mesh . getModeStart ( ) ;
@ -2202,7 +2202,7 @@ public class OGLESShaderRenderer implements Renderer {
if ( ( attribs [ loc ] ! = vb ) | | vb . isUpdateNeeded ( ) ) {
if ( ( attribs [ loc ] ! = vb ) | | vb . isUpdateNeeded ( ) ) {
// NOTE: Use data from interleaved buffer if specified
// NOTE: Use data from interleaved buffer if specified
VertexBuffer avb = idb ! = null ? idb : vb ;
VertexBuffer avb = idb ! = null ? idb : vb ;
avb . getData ( ) . clear ( ) ;
avb . getData ( ) . rewind ( ) ;
avb . getData ( ) . position ( vb . getOffset ( ) ) ;
avb . getData ( ) . position ( vb . getOffset ( ) ) ;
// Upload attribute data
// Upload attribute data