summaryrefslogtreecommitdiffstats
path: root/opengl/java/com/google/android
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2009-12-09 15:59:08 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-09 15:59:08 -0800
commit74befcc7fd721ca34f60bf75e18ce6faaab37aef (patch)
tree40ceb357754a0619c9f0a719679065272fd1fe50 /opengl/java/com/google/android
parentfac576360f7b2cd06e6b174894e8d192088349b0 (diff)
parent981ccfbbfd737e2bdf0cedec0089975f91fd4e0a (diff)
downloadframeworks_base-74befcc7fd721ca34f60bf75e18ce6faaab37aef.zip
frameworks_base-74befcc7fd721ca34f60bf75e18ce6faaab37aef.tar.gz
frameworks_base-74befcc7fd721ca34f60bf75e18ce6faaab37aef.tar.bz2
am 981ccfbb: Implement Matrix Palette extension.
Merge commit '981ccfbbfd737e2bdf0cedec0089975f91fd4e0a' into eclair-mr2-plus-aosp * commit '981ccfbbfd737e2bdf0cedec0089975f91fd4e0a': Implement Matrix Palette extension.
Diffstat (limited to 'opengl/java/com/google/android')
-rw-r--r--opengl/java/com/google/android/gles_jni/GLImpl.java76
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(