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/android/opengl/GLES11Ext.java | |
| 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/android/opengl/GLES11Ext.java')
| -rw-r--r-- | opengl/java/android/opengl/GLES11Ext.java | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/opengl/java/android/opengl/GLES11Ext.java b/opengl/java/android/opengl/GLES11Ext.java index 4384e9e..25d5467 100644 --- a/opengl/java/android/opengl/GLES11Ext.java +++ b/opengl/java/android/opengl/GLES11Ext.java @@ -19,6 +19,8 @@ package android.opengl; +import java.nio.Buffer; + public class GLES11Ext { public static final int GL_BLEND_EQUATION_RGB_OES = 0x8009; public static final int GL_BLEND_EQUATION_ALPHA_OES = 0x883D; @@ -129,6 +131,12 @@ public class GLES11Ext { _nativeClassInit(); } + private static final int GL_BYTE = GLES10.GL_BYTE; + private static final int GL_FIXED = GLES10.GL_FIXED; + private static final int GL_FLOAT = GLES10.GL_FLOAT; + private static final int GL_SHORT = GLES10.GL_SHORT; + + private static Buffer _matrixIndexPointerOES; // C function void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha ) public static native void glBlendEquationSeparateOES( @@ -866,22 +874,64 @@ public class GLES11Ext { // C function void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) - public static native void glMatrixIndexPointerOES( + private static native void glMatrixIndexPointerOESBounds( int size, int type, int stride, - java.nio.Buffer pointer + java.nio.Buffer pointer, + int remaining ); + public static 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 glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) - public static native void glWeightPointerOES( + private static native void glWeightPointerOESBounds( int size, int type, int stride, - java.nio.Buffer pointer + java.nio.Buffer pointer, + int remaining ); + public static void glWeightPointerOES( + int size, + int type, + int stride, + java.nio.Buffer pointer + ) { + glWeightPointerOESBounds( + size, + type, + stride, + pointer, + pointer.remaining() + ); + } + // C function void glDepthRangefOES ( GLclampf zNear, GLclampf zFar ) public static native void glDepthRangefOES( |
