1

Any ideas why these attribs fail to retrieve any suitable EGL config for me on Kindle Fire?

EGL_RED_SIZE = 5
EGL_GREEN_SIZE = 6
EGL_BLUE_SIZE = 5
EGL_ALPHA_SIZE = 0
EGL_DEPTH_SIZE = 0
EGL_STENCIL_SIZE = 0
EGL_CONFIG_CAVEAT = EGL_NONE

I've noticed this seems to happen on Motorola XT320 also. However, a vast majority of 2.3+ android devices seem work just fine with these attribs, but not these two.

I don't have either of the devices, but users report my app crashing on these two devices right in the start and logs seem to indicate it is because of no valid EGL configs were found.

I managed to reproduce this on android emulator, using Amazon's addons to emulate Kindle Fire. Kindle Fire HD seemed to work just fine.

A code snippet (On Kindle Fire it throws IllegalArgumentException "No configs match configSpec"):

//mConfigSpec is an array of ints with config_attribs ending into EGL_NONE.
int[] num_config = new int[1];
EGLDisplay display = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
if (display == EGL10.EGL_NO_DISPLAY) {
       throw new RuntimeException("eglGetDisplay failed");
}
if (!egl.eglChooseConfig(display, mConfigSpec, null, 0, num_config)) {
       throw new IllegalArgumentException("eglChooseConfig failed");
}
int numConfigs = num_config[0];
if (numConfigs <= 0) {
       throw new IllegalArgumentException("No configs match configSpec");
}
Habba
  • 1,179
  • 2
  • 13
  • 32
  • do you have a snippet of code that reproduces the crash? I suspect if it's a problem with original Kindle Fire (Gingerbread) that nothing is going to change, so might need to trap the exception – Offbeatmammal Feb 12 '13 at 16:44

0 Answers0