You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: GLES20: add glReadPixels
This commit is contained in:
@@ -257,3 +257,12 @@ JNIEXPORT void JNICALL Java_android_opengl_GLES20_glFlush(JNIEnv *env, jclass th
|
|||||||
{
|
{
|
||||||
glFlush();
|
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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glPushMatrix
|
||||||
(JNIEnv *, jobject);
|
(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
|
* Class: com_google_android_gles_jni_GLImpl
|
||||||
* Method: glRotatef
|
* Method: glRotatef
|
||||||
|
|||||||
@@ -772,14 +772,16 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
|
|||||||
|
|
||||||
// C function void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )
|
// C function void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )
|
||||||
|
|
||||||
public native void glReadPixels(
|
public void glReadPixels(
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int format,
|
int format,
|
||||||
int type,
|
int type,
|
||||||
java.nio.Buffer pixels);
|
java.nio.Buffer pixels) {
|
||||||
|
GLES10.glReadPixels(x, y, width, height, format, type, pixels);
|
||||||
|
}
|
||||||
|
|
||||||
// C function void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
|
// C function void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user