* Added android 2.2 workaround for glVertexAttribPointer

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8658 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 13 years ago
parent 270703ca58
commit 6110509b8e
  1. 14
      engine/src/android/com/jme3/renderer/android/Android22Workaround.java
  2. 12
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.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);
}
}

@ -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;
}

Loading…
Cancel
Save