v0.4.2: fixed incorrect offset values for drawQuads

This commit is contained in:
Evan Debenham 2016-08-23 02:13:34 -04:00 committed by Evan Debenham
parent f1164af058
commit 8537b86c5b

View File

@ -157,9 +157,9 @@ public class NoosaScript extends Script {
buffer.release();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
GLES20.glDrawElements( GLES20.GL_TRIANGLES, Quad.SIZE * length, GLES20.GL_UNSIGNED_SHORT, Quad.SIZE * offset );
GLES20.glDrawElements( GLES20.GL_TRIANGLES, Quad.SIZE * length, GLES20.GL_UNSIGNED_SHORT, Quad.SIZE * Short.SIZE/8 * offset );
} else {
FroyoGLES20Fix.glDrawElements( GLES20.GL_TRIANGLES, Quad.SIZE * length, GLES20.GL_UNSIGNED_SHORT, Quad.SIZE * offset );
FroyoGLES20Fix.glDrawElements( GLES20.GL_TRIANGLES, Quad.SIZE * length, GLES20.GL_UNSIGNED_SHORT, Quad.SIZE * Short.SIZE/8 * offset );
}
}