From 6d690ff5af8ddfc8af5249992703231777b15573 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Wed, 10 Sep 2014 02:43:50 +0200 Subject: [PATCH] android: enable GLSurfaceView debug flags with GLAdapter.debug --- vtm-android/src/org/oscim/android/gl/GLView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vtm-android/src/org/oscim/android/gl/GLView.java b/vtm-android/src/org/oscim/android/gl/GLView.java index 33358c38..fcecb62d 100644 --- a/vtm-android/src/org/oscim/android/gl/GLView.java +++ b/vtm-android/src/org/oscim/android/gl/GLView.java @@ -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);