* Added android 2.2 workaround for glVertexAttribPointer

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8658 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
sha..rd 2011-11-12 02:55:51 +00:00
parent 270703ca58
commit 6110509b8e
2 changed files with 20 additions and 6 deletions

View File

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

View File

@ -2432,12 +2432,12 @@ public class OGLESShaderRenderer implements Renderer {
+ "data.capacity=" + vb.getData().capacity() + ")"); + "data.capacity=" + vb.getData().capacity() + ")");
} }
GLES20.glVertexAttribPointer(loc, Android22Workaround.glVertexAttribPointer(loc,
vb.getNumComponents(), vb.getNumComponents(),
convertFormat(vb.getFormat()), convertFormat(vb.getFormat()),
vb.isNormalized(), vb.isNormalized(),
vb.getStride(), vb.getStride(),
vb.getData()); 0);
attribs[loc] = vb; attribs[loc] = vb;
} }