I am creating a live wallpaper using openGL ES 2.0. The app works great in my nexus one but it doesn't not show anything in a Nexus S.
Things I have tested so far:
I have already checked this question. My texture is 128x128 so I guess this isn't the issue.
I have used the
checkGlError
method in my code and I found that it passes theonSurfaceCreated
andonSurfaceChanged
without issues. The method throws an exception if I call it in the first line of theonDrawFrame()
method.
The checkGlError
code is the following:
private void checkGlError(String op) {
int error;
while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
Log.e(TAG, op + ": glError " + error);
throw new RuntimeException(op + ": glError " + error);
}
}
I notice that the error occurs in both devices, but it looks critical in the nexus S while it draws fine in the nexus one. My guess is that the shader is not compiled correctly and there is an issue there.
Do you know other incompatibilities between the nexus S and the nexus one? Is there a way of debugging shader's code?