Added support of UInt vertex indexes on iOS if available

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11051 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
Kostya 11 years ago
parent d29e95da06
commit c439fc91ba
  1. 6
      engine/src/ios/com/jme3/renderer/ios/IGLESShaderRenderer.java

@ -69,6 +69,7 @@ public class IGLESShaderRenderer implements Renderer {
private FrameBuffer mainFbOverride = null;
private boolean useVBO = true;
private boolean powerVr = false;
private boolean uintIndexSupport = false;
private Shader boundShader;
@ -1220,6 +1221,9 @@ public class IGLESShaderRenderer implements Renderer {
logger.log(Level.FINE, "Caps: {0}", caps);
logger.setLevel(store);
uintIndexSupport = extensions.contains("GL_OES_element_index_uint");
logger.log(Level.FINE, "Support for UInt index: {0}", uintIndexSupport);
}
@ -1922,7 +1926,7 @@ public class IGLESShaderRenderer implements Renderer {
Buffer indexData = indexBuf.getData();
if (indexBuf.getFormat() == Format.UnsignedInt) {
if (!uintIndexSupport && (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.");
}

Loading…
Cancel
Save