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
This commit is contained in:
parent
bfb1b21d6b
commit
a5c19f54c3
@ -95,7 +95,7 @@ public class AndroidConfigChooser implements EGLConfigChooser {
|
|||||||
@Override
|
@Override
|
||||||
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
|
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
|
||||||
logger.fine("GLSurfaceView asks for egl config, returning: ");
|
logger.fine("GLSurfaceView asks for egl config, returning: ");
|
||||||
logEGLConfig(choosenConfig, display, egl);
|
logEGLConfig(choosenConfig, display, egl, Level.FINE);
|
||||||
return choosenConfig;
|
return choosenConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ public class AndroidConfigChooser implements EGLConfigChooser {
|
|||||||
|
|
||||||
if (choosenConfig != null) {
|
if (choosenConfig != null) {
|
||||||
logger.info("JME3 using choosen config: ");
|
logger.info("JME3 using choosen config: ");
|
||||||
logEGLConfig(choosenConfig, display, egl);
|
logEGLConfig(choosenConfig, display, egl, Level.INFO);
|
||||||
pixelFormat = getPixelFormat(choosenConfig, display, egl);
|
pixelFormat = getPixelFormat(choosenConfig, display, egl);
|
||||||
clientOpenGLESVersion = getOpenGLVersion(choosenConfig, display, egl);
|
clientOpenGLESVersion = getOpenGLVersion(choosenConfig, display, egl);
|
||||||
return true;
|
return true;
|
||||||
@ -165,38 +165,38 @@ public class AndroidConfigChooser implements EGLConfigChooser {
|
|||||||
* @param display
|
* @param display
|
||||||
* @param egl
|
* @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];
|
int[] value = new int[1];
|
||||||
|
|
||||||
egl.eglGetConfigAttrib(display, conf, EGL10.EGL_RED_SIZE, value);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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() {
|
public int getClientOpenGLESVersion() {
|
||||||
@ -230,10 +230,11 @@ public class AndroidConfigChooser implements EGLConfigChooser {
|
|||||||
EGLConfig[] configs = new EGLConfig[numConfigs];
|
EGLConfig[] configs = new EGLConfig[numConfigs];
|
||||||
egl.eglChooseConfig(display, configSpec, configs, numConfigs, num_config);
|
egl.eglChooseConfig(display, configSpec, configs, numConfigs, num_config);
|
||||||
|
|
||||||
// System.err.println("-----------------------------");
|
logger.fine("--------------Display Configurations---------------");
|
||||||
// for (EGLConfig eGLConfig : configs) {
|
for (EGLConfig eGLConfig : configs) {
|
||||||
// logEGLConfig(eGLConfig, display, egl);
|
logEGLConfig(eGLConfig, display, egl, Level.FINE);
|
||||||
// }
|
logger.fine("----------------------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
EGLConfig config = chooseConfig(egl, display, configs);
|
EGLConfig config = chooseConfig(egl, display, configs);
|
||||||
return config;
|
return config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user