Open GoogleCodeExporter opened 8 years ago
Funny, I just ran into this issue myself, the stand alone GLES2 app runs fine,
but fails when ported to use this live wallpaper backend. On other devices it's
running fine.
However, Im getting another error which shows the device is having issues with
compiling shaders. The SpriteBatch default shader doesn't compile, nor do my
own shaders. So yes, it may be related to incorrect initialization.
thread start
[16:09] <Josh332> FATAL EXCEPTION: GLThread 1046
[16:09] <Josh332> java.lang.IllegalArgumentException: couldn't compile shader:
[16:09] <Josh332> at com.badlogic.gdx.graphics.g2d.SpriteBatch.createDefaultSha
der(SpriteBatch.java:225)
Original comment by dvange...@gmail.com
on 10 Aug 2012 at 2:16
Do you know why gl context initialization is incorrect just on Galaxy s3?
According to logs I didn't detect anything wrong. Do you have any idea to solve
that?
Original comment by artempar...@gmail.com
on 13 Aug 2012 at 4:52
[deleted comment]
I am getting a similar error reported form the S3: -
java.lang.NullPointerException
at
com.badlogic.gdx.backends.android.livewallpaper.AndroidGraphicsLW.setupGL(Androi
dGraphicsLW.java:254)
at
com.badlogic.gdx.backends.android.livewallpaper.AndroidGraphicsLW.onSurfaceCreat
ed(AndroidGraphicsLW.java:296)
at
com.badlogic.gdx.backends.android.livewallpaper.surfaceview.GLBaseSurfaceView$GL
Thread.guardedRun(GLBaseSurfaceView.java:974)
at
com.badlogic.gdx.backends.android.livewallpaper.surfaceview.GLBaseSurfaceView$GL
Thread.run(GLBaseSurfaceView.java:839)
Unfortunately I don't have access to an S3 to test :(
Original comment by ash.mcco...@gmail.com
on 20 Aug 2012 at 8:42
Hi Folks,
Anoir posted a fix for this on the libgdx forums.
http://badlogicgames.com/forum/viewtopic.php?f=11&t=5042&p=25027#p24967
package com.badlogic.gdx.backends.android.livewallpaper;
class AndroidGraphicsLW
private void setupGL(javax.microedition.khronos.opengles.GL10 gl) {
if (gl10 != null || gl20 != null)
return;
boolean isGL20 = checkGL20();
Gdx.app.log("AndroidGraphics", "GL20: " + isGL20);
if (view instanceof GLSurfaceView20) {
gl20 = new AndroidGL20();
this.gl = gl20;
} else {
gl10 = new AndroidGL10(gl);
this.gl = gl10;
// comment out the following lines
// if (gl instanceof javax.microedition.khronos.opengles.GL11) {
// String renderer = gl.glGetString(GL10.GL_RENDERER);
// if (!renderer.toLowerCase().contains("pixelflinger")
// && !(android.os.Build.MODEL.equals("MB200")
// || android.os.Build.MODEL.equals("MB220") ||
android.os.Build.MODEL
// .contains("Behold"))) {
// gl11 = new AndroidGL11(
// (javax.microedition.khronos.opengles.GL11) gl);
// gl10 = gl11;
// }
// }
}
That code seems to deal with REALLY old phones running Android 1.5 and 1.6
which couldn't run a live wallpaper in any case, so hopefully there shouldn't
be any problem with commenting them
Original comment by ash.mcco...@gmail.com
on 24 Aug 2012 at 9:02
Original issue reported on code.google.com by
artempar...@gmail.com
on 10 Aug 2012 at 7:35Attachments: