* Fix android native crashes and other bizarre problems with 32-bit index buffers

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10145 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..RD 12 years ago
parent 6981452974
commit 455a621384
  1. 6
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java

@ -1887,6 +1887,12 @@ public class OGLESShaderRenderer implements Renderer {
boolean useInstancing = count > 1 && caps.contains(Caps.MeshInstancing);
Buffer indexData = indexBuf.getData();
if (indexBuf.getFormat() == Format.UnsignedInt) {
throw new RendererException("OpenGL ES does not support 32-bit index buffers." +
"Split your models to avoid going over 65536 vertices.");
}
if (mesh.getMode() == Mode.Hybrid) {
int[] modeStart = mesh.getModeStart();
int[] elementLengths = mesh.getElementLengths();

Loading…
Cancel
Save