diff options
Diffstat (limited to 'opengl/tools/glgen/stubs/gles11')
5 files changed, 51 insertions, 2 deletions
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if index 428ccee..c5e34cd 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if @@ -18,6 +18,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; @@ -127,4 +129,10 @@ public class GLES11Ext { static { _nativeClassInit(); } -
\ No newline at end of file + + 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;
\ No newline at end of file diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp index 294d1ce..2548b32 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp @@ -23,6 +23,15 @@ #include <GLES/gl.h> #include <GLES/glext.h> +/* special calls implemented in Android's GLES wrapper used to more + * efficiently bound-check passed arrays */ +extern "C" { +GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, GLsizei stride, + const GLvoid *ptr, GLsizei count); +GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride, + const GLvoid *ptr, GLsizei count); +} + static int initialized = 0; static jclass nioAccessClass; @@ -121,5 +130,17 @@ releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) commit ? 0 : JNI_ABORT); } +static void * +getDirectBufferPointer(JNIEnv *_env, jobject buffer) { + char* buf = (char*) _env->GetDirectBufferAddress(buffer); + if (buf) { + jint position = _env->GetIntField(buffer, positionID); + jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); + buf += position << elementSizeShift; + } else { + _env->ThrowNew(IAEClass, "Must use a native order direct Buffer"); + } + return (void*) buf; +} // -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if index 26f466f..81572d2 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if @@ -149,3 +149,4 @@ public class GLES11 extends GLES10 { _nativeClassInit(); } + private static Buffer _pointSizePointerOES; diff --git a/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp index 294d1ce..4c297f7 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp @@ -23,6 +23,13 @@ #include <GLES/gl.h> #include <GLES/glext.h> +/* special calls implemented in Android's GLES wrapper used to more + * efficiently bound-check passed arrays */ +extern "C" { +GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, GLsizei stride, + const GLvoid *ptr, GLsizei count); +} + static int initialized = 0; static jclass nioAccessClass; @@ -121,5 +128,18 @@ releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) commit ? 0 : JNI_ABORT); } +static void * +getDirectBufferPointer(JNIEnv *_env, jobject buffer) { + char* buf = (char*) _env->GetDirectBufferAddress(buffer); + if (buf) { + jint position = _env->GetIntField(buffer, positionID); + jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); + buf += position << elementSizeShift; + } else { + _env->ThrowNew(IAEClass, "Must use a native order direct Buffer"); + } + return (void*) buf; +} + // -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if index 7504509..b615e0a 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if @@ -19,7 +19,6 @@ package android.opengl; /** OpenGL ES 2.0 - * @hide */ public class GLES20 { public static final int GL_ACTIVE_TEXTURE = 0x84E0; |