|
|
@ -258,17 +258,17 @@ public class AndroidConfigChooser implements EGLConfigChooser |
|
|
|
int[] value = new int[1]; |
|
|
|
int[] value = new int[1]; |
|
|
|
|
|
|
|
|
|
|
|
// Choose 565 color size
|
|
|
|
// Choose 565 color size
|
|
|
|
egl.eglGetConfigAttrib(display, a, EGL10.EGL_RED_SIZE, value); |
|
|
|
egl.eglGetConfigAttrib(display, a, EGL10.EGL_GREEN_SIZE, value); |
|
|
|
int redA = value[0]; |
|
|
|
int greenA = value[0]; |
|
|
|
|
|
|
|
|
|
|
|
egl.eglGetConfigAttrib(display, b, EGL10.EGL_RED_SIZE, value); |
|
|
|
egl.eglGetConfigAttrib(display, b, EGL10.EGL_GREEN_SIZE, value); |
|
|
|
int redB = value[0]; |
|
|
|
int greenB = value[0]; |
|
|
|
|
|
|
|
|
|
|
|
if ((redA == 5) && (redB != 5)) |
|
|
|
if ((greenA == 6) && (greenB != 6)) |
|
|
|
result = a; |
|
|
|
result = a; |
|
|
|
else if ((redA != 5) && (redB == 5)) |
|
|
|
else if ((greenA != 6) && (greenB == 6)) |
|
|
|
result = b; |
|
|
|
result = b; |
|
|
|
else // red size is equal
|
|
|
|
else // green size is equal
|
|
|
|
{ |
|
|
|
{ |
|
|
|
// Choose lowest depth size
|
|
|
|
// Choose lowest depth size
|
|
|
|
egl.eglGetConfigAttrib(display, a, EGL10.EGL_DEPTH_SIZE, value); |
|
|
|
egl.eglGetConfigAttrib(display, a, EGL10.EGL_DEPTH_SIZE, value); |
|
|
@ -321,6 +321,8 @@ public class AndroidConfigChooser implements EGLConfigChooser |
|
|
|
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_RED_SIZE, value); |
|
|
|
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_RED_SIZE, value); |
|
|
|
if (value[0] == 8) |
|
|
|
if (value[0] == 8) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
result = PixelFormat.RGBA_8888; |
|
|
|
|
|
|
|
/* |
|
|
|
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_ALPHA_SIZE, value); |
|
|
|
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_ALPHA_SIZE, value); |
|
|
|
if (value[0] == 8) |
|
|
|
if (value[0] == 8) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -329,8 +331,14 @@ public class AndroidConfigChooser implements EGLConfigChooser |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
result = PixelFormat.RGB_888; |
|
|
|
result = PixelFormat.RGB_888; |
|
|
|
|
|
|
|
}*/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (verbose) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
logger.info("Using PixelFormat " + result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|