Commit 62759e8d by olly Committed by Oliver Woodman

Cleanup VR video player sample app

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218003875
parent f3b45754
...@@ -40,18 +40,14 @@ public final class GlUtil { ...@@ -40,18 +40,14 @@ public final class GlUtil {
* ExoPlayerLibraryInfo#GL_ASSERTIONS_ENABLED} is true throws a {@link RuntimeException}. * ExoPlayerLibraryInfo#GL_ASSERTIONS_ENABLED} is true throws a {@link RuntimeException}.
*/ */
public static void checkGlError() { public static void checkGlError() {
int error = GLES20.glGetError(); int lastError = GLES20.GL_NO_ERROR;
int lastError; int error;
if (error != GLES20.GL_NO_ERROR) { while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
do { Log.e(TAG, "glError " + gluErrorString(lastError));
lastError = error; lastError = error;
Log.e(TAG, "glError " + gluErrorString(lastError)); }
error = GLES20.glGetError(); if (ExoPlayerLibraryInfo.GL_ASSERTIONS_ENABLED && lastError != GLES20.GL_NO_ERROR) {
} while (error != GLES20.GL_NO_ERROR); throw new RuntimeException("glError " + gluErrorString(lastError));
if (ExoPlayerLibraryInfo.GL_ASSERTIONS_ENABLED) {
throw new RuntimeException("glError " + gluErrorString(lastError));
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment