Skip to content
Snippets Groups Projects
Commit 15f6d481 authored by Leo Ma's avatar Leo Ma
Browse files

Add GL debug function


Signed-off-by: default avatarLeo Ma <begeekmyfriend@gmail.com>
parent e66268d8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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);
}
}
}
Loading
Loading
@@ -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);
}
\ No newline at end of file
gl_FragColor = texture2D(inputImageTexture, textureCoordinate);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment