diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-08 20:13:44 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-08 20:13:44 -0800 |
commit | 5c47265a704cb0cc081b79e191442f99014726b0 (patch) | |
tree | b162ef47569b58713fd90ac0a6ad4e7402b02a3e /opengl/java/com | |
parent | 7279fb9aee1abae405384e2c4331b7d9fec28294 (diff) | |
parent | be6eac828f5af8b608c3fa6749330f1dcd6b6206 (diff) | |
download | frameworks_base-5c47265a704cb0cc081b79e191442f99014726b0.zip frameworks_base-5c47265a704cb0cc081b79e191442f99014726b0.tar.gz frameworks_base-5c47265a704cb0cc081b79e191442f99014726b0.tar.bz2 |
Merge change Ibe6eac82
* changes:
Implement Matrix Palette extension.
Diffstat (limited to 'opengl/java/com')
-rw-r--r-- | opengl/java/com/google/android/gles_jni/GLImpl.java | 76 |
1 files changed, 70 insertions, 6 deletions
diff --git a/opengl/java/com/google/android/gles_jni/GLImpl.java b/opengl/java/com/google/android/gles_jni/GLImpl.java index 36b6ea0..01a9c91 100644 --- a/opengl/java/com/google/android/gles_jni/GLImpl.java +++ b/opengl/java/com/google/android/gles_jni/GLImpl.java @@ -45,6 +45,9 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { Buffer _normalPointer = null; Buffer _texCoordPointer = null; Buffer _vertexPointer = null; + Buffer _pointSizePointerOES = null; + Buffer _matrixIndexPointerOES = null; + Buffer _weightPointerOES = null; public GLImpl() { } @@ -1582,12 +1585,31 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { // C function void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) - public native void glPointSizePointerOES( + private native void glPointSizePointerOESBounds( int type, int stride, - java.nio.Buffer pointer + java.nio.Buffer pointer, + int remaining ); + public void glPointSizePointerOES( + int type, + int stride, + java.nio.Buffer pointer + ) { + glPointSizePointerOESBounds( + type, + stride, + pointer, + pointer.remaining() + ); + if (((type == GL_FLOAT) || + (type == GL_FIXED)) && + (stride >= 0)) { + _pointSizePointerOES = pointer; + } + } + // C function void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) public native void glTexCoordPointer( @@ -1795,13 +1817,39 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { // C function void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) - public native void glMatrixIndexPointerOES( + private native void glMatrixIndexPointerOESBounds( int size, int type, int stride, - java.nio.Buffer pointer + java.nio.Buffer pointer, + int remaining ); + public void glMatrixIndexPointerOES( + int size, + int type, + int stride, + java.nio.Buffer pointer + ) { + glMatrixIndexPointerOESBounds( + size, + type, + stride, + pointer, + pointer.remaining() + ); + if (((size == 2) || + (size == 3) || + (size == 4)) && + ((type == GL_FLOAT) || + (type == GL_BYTE) || + (type == GL_SHORT) || + (type == GL_FIXED)) && + (stride >= 0)) { + _matrixIndexPointerOES = pointer; + } + } + // C function void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) public native void glMatrixIndexPointerOES( @@ -1813,13 +1861,29 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { // C function void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) - public native void glWeightPointerOES( + private native void glWeightPointerOESBounds( int size, int type, int stride, - java.nio.Buffer pointer + java.nio.Buffer pointer, + int remaining ); + public void glWeightPointerOES( + int size, + int type, + int stride, + java.nio.Buffer pointer + ) { + glWeightPointerOESBounds( + size, + type, + stride, + pointer, + pointer.remaining() + ); + } + // C function void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset ) public native void glWeightPointerOES( |