Revision 31911113
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/main/RubikRenderer.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.main; |
21 | 21 |
|
22 |
import android.opengl.GLES30; |
|
22 | 23 |
import android.opengl.GLSurfaceView; |
24 |
|
|
23 | 25 |
import org.distorted.effects.BaseEffect; |
24 | 26 |
import org.distorted.library.effect.VertexEffectSink; |
25 | 27 |
import org.distorted.library.main.DistortedLibrary; |
... | ... | |
28 | 30 |
import javax.microedition.khronos.egl.EGLConfig; |
29 | 31 |
import javax.microedition.khronos.opengles.GL10; |
30 | 32 |
|
33 |
import com.google.firebase.crashlytics.FirebaseCrashlytics; |
|
34 |
|
|
31 | 35 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
32 | 36 |
|
33 | 37 |
public class RubikRenderer implements GLSurfaceView.Renderer |
... | ... | |
78 | 82 |
} |
79 | 83 |
catch(Exception ex) |
80 | 84 |
{ |
81 |
android.util.Log.e("Rubik", ex.getMessage() ); |
|
85 |
String message = ex.getMessage(); |
|
86 |
String shading = GLES30.glGetString(GLES30.GL_SHADING_LANGUAGE_VERSION); |
|
87 |
String version = GLES30.glGetString(GLES30.GL_VERSION); |
|
88 |
String vendor = GLES30.glGetString(GLES30.GL_VENDOR); |
|
89 |
String renderer= GLES30.glGetString(GLES30.GL_RENDERER); |
|
90 |
|
|
91 |
if( message==null ) message = "exception NULL"; |
|
92 |
|
|
93 |
if( BuildConfig.DEBUG ) |
|
94 |
{ |
|
95 |
android.util.Log.e("DISTORTED", message ); |
|
96 |
android.util.Log.e("DISTORTED", "GLSL Version "+shading); |
|
97 |
android.util.Log.e("DISTORTED", "GL Version " +version); |
|
98 |
android.util.Log.e("DISTORTED", "GL Vendor " +vendor); |
|
99 |
android.util.Log.e("DISTORTED", "GL Renderer " +renderer); |
|
100 |
} |
|
101 |
else |
|
102 |
{ |
|
103 |
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); |
|
104 |
crashlytics.setCustomKey("DistortedError", message ); |
|
105 |
crashlytics.setCustomKey("GLSLversion" , shading ); |
|
106 |
crashlytics.setCustomKey("GLversion" , version ); |
|
107 |
crashlytics.setCustomKey("GLSLvendor" , vendor ); |
|
108 |
crashlytics.setCustomKey("GLSLrenderer" , renderer); |
|
109 |
} |
|
82 | 110 |
} |
83 | 111 |
} |
84 | 112 |
|
Also available in: Unified diff
Improve logging in case the Distorted Library returned an error - add Crashlytics custom keys.