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: com/google/android/gles_jni/GLImpl: implement some things by calling into GLES10
This commit is contained in:
@@ -47,22 +47,6 @@ JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glBindTexture
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glBlendFunc
|
||||
(JNIEnv *, jobject, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: com_google_android_gles_jni_GLImpl
|
||||
* Method: glClear
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glClear
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
/*
|
||||
* Class: com_google_android_gles_jni_GLImpl
|
||||
* Method: glClearColor
|
||||
* Signature: (FFFF)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glClearColor
|
||||
(JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat);
|
||||
|
||||
/*
|
||||
* Class: com_google_android_gles_jni_GLImpl
|
||||
* Method: glClearColorx
|
||||
@@ -1199,20 +1183,12 @@ JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glGetFixedv__I_3
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glGetFixedv__ILjava_nio_IntBuffer_2
|
||||
(JNIEnv *, jobject, jint, jobject);
|
||||
|
||||
/*
|
||||
* Class: com_google_android_gles_jni_GLImpl
|
||||
* Method: glGetFloatv
|
||||
* Signature: (I[FI)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glGetFloatv__I_3FI
|
||||
(JNIEnv *, jobject, jint, jfloatArray, jint);
|
||||
|
||||
/*
|
||||
* Class: com_google_android_gles_jni_GLImpl
|
||||
* Method: glGetFloatv
|
||||
* Signature: (ILjava/nio/FloatBuffer;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glGetFloatv__ILjava_nio_FloatBuffer_2
|
||||
JNIEXPORT void JNICALL Java_com_google_android_gles_1jni_GLImpl_glGetFloatv
|
||||
(JNIEnv *, jobject, jint, jobject);
|
||||
|
||||
/*
|
||||
|
||||
@@ -33,6 +33,8 @@ import javax.microedition.khronos.opengles.GL11;
|
||||
import javax.microedition.khronos.opengles.GL11Ext;
|
||||
import javax.microedition.khronos.opengles.GL11ExtensionPack;
|
||||
|
||||
import android.opengl.GLES10;
|
||||
|
||||
public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
|
||||
// Private accessors for native code
|
||||
|
||||
@@ -116,16 +118,20 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
|
||||
|
||||
// C function void glClear ( GLbitfield mask )
|
||||
|
||||
public native void glClear(
|
||||
int mask);
|
||||
public void glClear(
|
||||
int mask) {
|
||||
GLES10.glClear(mask);
|
||||
}
|
||||
|
||||
// C function void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
|
||||
|
||||
public native void glClearColor(
|
||||
public void glClearColor(
|
||||
float red,
|
||||
float green,
|
||||
float blue,
|
||||
float alpha);
|
||||
float alpha) {
|
||||
GLES10.glClearColor(red, green, blue, alpha);
|
||||
}
|
||||
|
||||
// C function void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha )
|
||||
|
||||
@@ -1198,10 +1204,12 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
|
||||
|
||||
// C function void glGetFloatv ( GLenum pname, GLfloat *params )
|
||||
|
||||
public native void glGetFloatv(
|
||||
public void glGetFloatv(
|
||||
int pname,
|
||||
float[] params,
|
||||
int offset);
|
||||
int offset) {
|
||||
GLES10.glGetFloatv(pname, params, offset);
|
||||
}
|
||||
|
||||
// C function void glGetFloatv ( GLenum pname, GLfloat *params )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user