api-impl: GLES20: add glReadPixels

This commit is contained in:
Mis012
2024-06-28 21:35:13 +02:00
parent 3c69d50af1
commit 26d6337a34
3 changed files with 13 additions and 10 deletions

View File

@@ -257,3 +257,12 @@ JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFlush(JNIEnv *env, jclass th
{
glFlush();
}
JNIEXPORT void JNICALL Java_android_opengl_GLES20_glReadPixels(JNIEnv *env, jclass this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf)
{
jarray array_ref;
jbyte *array;
GLvoid *pixels = get_nio_buffer(env, pixels_buf, &array_ref, &array);
glReadPixels(x, y, width, height, format, type, pixels);
release_nio_buffer(env, array_ref, array);
}

View File

@@ -751,14 +751,6 @@ JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glPopMatrix
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glPushMatrix
(JNIEnv *, jobject);
/*
* Class: com_google_android_gles_jni_GLImpl
* Method: glReadPixels
* Signature: (IIIIIILjava/nio/Buffer;)V
*/
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glReadPixels
(JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jobject);
/*
* Class: com_google_android_gles_jni_GLImpl
* Method: glRotatef