Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
@ -227,4 +227,15 @@ public class OpenGLUtils {
}
return body.toString();
/**
* Checks to see if a GLES error has been raised.
*/
public static void checkGlError(String op) {
int error = GLES20.glGetError();
if (error != GLES20.GL_NO_ERROR) {
String msg = op + ": glError 0x" + Integer.toHexString(error);
Log.e("OpenGlUtils", msg);
@ -5,6 +5,5 @@ varying mediump vec2 textureCoordinate;
uniform sampler2D inputImageTexture;
void main() {
vec3 centralColor = texture2D(inputImageTexture, textureCoordinate).rgb;
gl_FragColor = vec4(centralColor.rgb,1.0);
gl_FragColor = texture2D(inputImageTexture, textureCoordinate);