android: enable GLSurfaceView debug flags with GLAdapter.debug

This commit is contained in:
Hannes Janetzek
2014-09-10 02:43:50 +02:00
parent a97b3283a0
commit 6d690ff5af

View File

@@ -19,6 +19,7 @@ package org.oscim.android.gl;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import org.oscim.backend.GLAdapter;
import org.oscim.map.Map;
import android.content.Context;
@@ -54,7 +55,9 @@ public class GLView extends GLSurfaceView {
setEGLConfigChooser(new GlConfigChooser());
setEGLContextClientVersion(2);
//setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS);
if (GLAdapter.debug)
setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR | GLSurfaceView.DEBUG_LOG_GL_CALLS);
setRenderer(new GLRenderer(map));
setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);