From 123ccabaff6090521268cf6f341dd4a222b136bc Mon Sep 17 00:00:00 2001 From: "iwg..ic" Date: Fri, 13 Sep 2013 16:49:51 +0000 Subject: [PATCH] Android: Don't render mesh if vertex count == 0 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10775 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/renderer/android/OGLESShaderRenderer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java index ef67ceff8..1f0ec917f 100644 --- a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java +++ b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java @@ -128,7 +128,7 @@ public class OGLESShaderRenderer implements Renderer { public EnumSet getCaps() { return caps; } - + private int extractVersion(String prefixStr, String versionStr) { if (versionStr != null) { int spaceIdx = versionStr.indexOf(" ", prefixStr.length()); @@ -2332,6 +2332,10 @@ public class OGLESShaderRenderer implements Renderer { } public void renderMesh(Mesh mesh, int lod, int count) { + if (mesh.getVertexCount() == 0) { + return; + } + /* * NOTE: not supported in OpenGL ES 2.0. if (context.pointSize != mesh.getPointSize()) {