Fixes displaying leftover characters in BitmapText when setting the text to a smaller string and a weird situation where the scene would stop rendering do to improper buffer limit.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10060 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
iwg..ic 12 years ago
parent 609d51dbfd
commit ab5282fb2d
  1. 8
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java

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

Loading…
Cancel
Save