diff --git a/src/api-impl-jni/android_opengl_GLES20.c b/src/api-impl-jni/android_opengl_GLES20.c index 0e172536..9422173d 100644 --- a/src/api-impl-jni/android_opengl_GLES20.c +++ b/src/api-impl-jni/android_opengl_GLES20.c @@ -252,3 +252,8 @@ JNIEXPORT void JNICALL Java_android_opengl_GLES20_glGetFloatv__I_3FI(JNIEnv *env (*env)->ReleasePrimitiveArrayCritical(env, params_ref, params_base, 0); } + +JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFlush(JNIEnv *env, jclass this) +{ + glFlush(); +} diff --git a/src/api-impl-jni/egl/com_google_android_gles_jni_EGLImpl.c b/src/api-impl-jni/egl/com_google_android_gles_jni_EGLImpl.c index 7fa76e62..9150f7d4 100644 --- a/src/api-impl-jni/egl/com_google_android_gles_jni_EGLImpl.c +++ b/src/api-impl-jni/egl/com_google_android_gles_jni_EGLImpl.c @@ -125,3 +125,11 @@ JNIEXPORT jboolean JNICALL Java_com_google_android_gles_1jni_EGLImpl_native_1egl { return eglDestroyContext(_PTR(display), _PTR(context)); } + +JNIEXPORT jlong JNICALL Java_com_google_android_gles_1jni_EGLImpl_native_1eglCreatePbufferSurface(JNIEnv *env, jobject this, jlong display, jlong config, jintArray _attrib_list) +{ + EGLint *attrib_list = get_int_array_crit(env, _attrib_list); + EGLSurface ret = eglCreatePbufferSurface(_PTR(display), _PTR(config), attrib_list); + release_int_array_crit(env, _attrib_list, attrib_list); + return _INTPTR(ret); +} diff --git a/src/api-impl-jni/generated_headers/com_google_android_gles_jni_EGLImpl.h b/src/api-impl-jni/generated_headers/com_google_android_gles_jni_EGLImpl.h index 4b51fe1c..cede490e 100644 --- a/src/api-impl-jni/generated_headers/com_google_android_gles_jni_EGLImpl.h +++ b/src/api-impl-jni/generated_headers/com_google_android_gles_jni_EGLImpl.h @@ -87,6 +87,14 @@ JNIEXPORT jboolean JNICALL Java_com_google_android_gles_1jni_EGLImpl_native_1egl JNIEXPORT jboolean JNICALL Java_com_google_android_gles_1jni_EGLImpl_native_1eglDestroyContext (JNIEnv *, jobject, jlong, jlong); +/* + * Class: com_google_android_gles_jni_EGLImpl + * Method: native_eglCreatePbufferSurface + * Signature: (JJ[I)J + */ +JNIEXPORT jlong JNICALL Java_com_google_android_gles_1jni_EGLImpl_native_1eglCreatePbufferSurface + (JNIEnv *, jobject, jlong, jlong, jintArray); + #ifdef __cplusplus } #endif diff --git a/src/api-impl-jni/generated_headers/com_google_android_gles_jni_GLImpl.h b/src/api-impl-jni/generated_headers/com_google_android_gles_jni_GLImpl.h index bcba5586..acefdf7a 100644 --- a/src/api-impl-jni/generated_headers/com_google_android_gles_jni_GLImpl.h +++ b/src/api-impl-jni/generated_headers/com_google_android_gles_jni_GLImpl.h @@ -263,14 +263,6 @@ JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glEnableClientSt JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glFinish (JNIEnv *, jobject); -/* - * Class: com_google_android_gles_jni_GLImpl - * Method: glFlush - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glFlush - (JNIEnv *, jobject); - /* * Class: com_google_android_gles_jni_GLImpl * Method: glFogf diff --git a/src/api-impl/com/google/android/gles_jni/EGLImpl.java b/src/api-impl/com/google/android/gles_jni/EGLImpl.java index 973ea8ba..a33d70d1 100644 --- a/src/api-impl/com/google/android/gles_jni/EGLImpl.java +++ b/src/api-impl/com/google/android/gles_jni/EGLImpl.java @@ -118,9 +118,12 @@ public class EGLImpl implements EGL10 { return native_eglDestroyContext(display.native_egl_display, context.native_egl_context); } + public EGLSurface eglCreatePbufferSurface(EGLDisplay display, EGLConfig config, int[] attrib_list) { + return new EGLSurfaceImpl(native_eglCreatePbufferSurface(display.native_egl_display, config.native_egl_config, attrib_list)); + } + /* STUBS */ public boolean eglCopyBuffers(EGLDisplay display, EGLSurface surface, Object native_pixmap) { return false; } - public EGLSurface eglCreatePbufferSurface(EGLDisplay display, EGLConfig config, int[] attrib_list) { return null; } public EGLSurface eglCreatePixmapSurface(EGLDisplay display, EGLConfig config, Object native_pixmap, int[] attrib_list) { return null; } public boolean eglGetConfigs(EGLDisplay display, EGLConfig[] configs, int config_size, int[] num_config) { return false; } public EGLContext eglGetCurrentContext() { return null; } @@ -146,4 +149,5 @@ public class EGLImpl implements EGL10 { private native boolean native_eglSwapBuffers(long native_egl_display, long native_surface); private native boolean native_eglDestroySurface(long native_egl_display, long native_surface); private native boolean native_eglDestroyContext(long native_egl_display, long native_context); + private native long native_eglCreatePbufferSurface(long native_egl_display, long native_egl_config, int[] attrib_list); } diff --git a/src/api-impl/com/google/android/gles_jni/GLImpl.java b/src/api-impl/com/google/android/gles_jni/GLImpl.java index 5d66ff83..2d770d02 100644 --- a/src/api-impl/com/google/android/gles_jni/GLImpl.java +++ b/src/api-impl/com/google/android/gles_jni/GLImpl.java @@ -344,7 +344,9 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { // C function void glFlush ( void ) - public native void glFlush(); + public void glFlush() { + GLES10.glFlush(); + } // C function void glFogf ( GLenum pname, GLfloat param )