Android : Added a FINE log of all the display configurations available on the device when the context starts.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10469 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent bfb1b21d6b
commit a5c19f54c3
  1. 35
      engine/src/android/com/jme3/system/android/AndroidConfigChooser.java

@ -95,7 +95,7 @@ public class AndroidConfigChooser implements EGLConfigChooser {
@Override
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
logger.fine("GLSurfaceView asks for egl config, returning: ");
logEGLConfig(choosenConfig, display, egl);
logEGLConfig(choosenConfig, display, egl, Level.FINE);
return choosenConfig;
}
@ -115,7 +115,7 @@ public class AndroidConfigChooser implements EGLConfigChooser {
if (choosenConfig != null) {
logger.info("JME3 using choosen config: ");
logEGLConfig(choosenConfig, display, egl);
logEGLConfig(choosenConfig, display, egl, Level.INFO);
pixelFormat = getPixelFormat(choosenConfig, display, egl);
clientOpenGLESVersion = getOpenGLVersion(choosenConfig, display, egl);
return true;
@ -165,38 +165,38 @@ public class AndroidConfigChooser implements EGLConfigChooser {
* @param display
* @param egl
*/
public void logEGLConfig(EGLConfig conf, EGLDisplay display, EGL10 egl) {
public void logEGLConfig(EGLConfig conf, EGLDisplay display, EGL10 egl, Level level) {
int[] value = new int[1];
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_RED_SIZE, value);
logger.info(String.format("EGL_RED_SIZE = %d", value[0]));
logger.log(level,String.format("EGL_RED_SIZE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_GREEN_SIZE, value);
logger.info(String.format("EGL_GREEN_SIZE = %d", value[0]));
logger.log(level,String.format("EGL_GREEN_SIZE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_BLUE_SIZE, value);
logger.info(String.format("EGL_BLUE_SIZE = %d", value[0]));
logger.log(level,String.format("EGL_BLUE_SIZE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_ALPHA_SIZE, value);
logger.info(String.format("EGL_ALPHA_SIZE = %d", value[0]));
logger.log(level,String.format("EGL_ALPHA_SIZE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_DEPTH_SIZE, value);
logger.info(String.format("EGL_DEPTH_SIZE = %d", value[0]));
logger.log(level,String.format("EGL_DEPTH_SIZE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_STENCIL_SIZE, value);
logger.info(String.format("EGL_STENCIL_SIZE = %d", value[0]));
logger.log(level,String.format("EGL_STENCIL_SIZE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_RENDERABLE_TYPE, value);
logger.info(String.format("EGL_RENDERABLE_TYPE = %d", value[0]));
logger.log(level,String.format("EGL_RENDERABLE_TYPE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_SURFACE_TYPE, value);
logger.info(String.format("EGL_SURFACE_TYPE = %d", value[0]));
logger.log(level,String.format("EGL_SURFACE_TYPE = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_SAMPLE_BUFFERS, value);
logger.info(String.format("EGL_SAMPLE_BUFFERS = %d", value[0]));
logger.log(level,String.format("EGL_SAMPLE_BUFFERS = %d", value[0]));
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_SAMPLES, value);
logger.info(String.format("EGL_SAMPLES = %d", value[0]));
logger.log(level,String.format("EGL_SAMPLES = %d", value[0]));
}
public int getClientOpenGLESVersion() {
@ -230,10 +230,11 @@ public class AndroidConfigChooser implements EGLConfigChooser {
EGLConfig[] configs = new EGLConfig[numConfigs];
egl.eglChooseConfig(display, configSpec, configs, numConfigs, num_config);
// System.err.println("-----------------------------");
// for (EGLConfig eGLConfig : configs) {
// logEGLConfig(eGLConfig, display, egl);
// }
logger.fine("--------------Display Configurations---------------");
for (EGLConfig eGLConfig : configs) {
logEGLConfig(eGLConfig, display, egl, Level.FINE);
logger.fine("----------------------------------------");
}
EGLConfig config = chooseConfig(egl, display, configs);
return config;

Loading…
Cancel
Save