diff --git a/engine/src/android/com/jme3/renderer/android/Android22Workaround.java b/engine/src/android/com/jme3/renderer/android/Android22Workaround.java new file mode 100644 index 000000000..9c5bf587a --- /dev/null +++ b/engine/src/android/com/jme3/renderer/android/Android22Workaround.java @@ -0,0 +1,14 @@ +package com.jme3.renderer.android; + +import android.opengl.GLES20; + +public class Android22Workaround { + public static void glVertexAttribPointer(int location, int components, int format, boolean normalize, int stride, int offset){ + GLES20.glVertexAttribPointer(location, + components, + format, + normalize, + stride, + offset); + } +} diff --git a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java index ab1276644..7fd367175 100644 --- a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java +++ b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java @@ -2432,12 +2432,12 @@ public class OGLESShaderRenderer implements Renderer { + "data.capacity=" + vb.getData().capacity() + ")"); } - GLES20.glVertexAttribPointer(loc, - vb.getNumComponents(), - convertFormat(vb.getFormat()), - vb.isNormalized(), - vb.getStride(), - vb.getData()); + Android22Workaround.glVertexAttribPointer(loc, + vb.getNumComponents(), + convertFormat(vb.getFormat()), + vb.isNormalized(), + vb.getStride(), + 0); attribs[loc] = vb; }