use of org.andengine.util.exception.DeviceNotSupportedException in project AndEngine by nicolasgramlich.
the class AndEngine method checkEGLConfigChooserSupport.
private static void checkEGLConfigChooserSupport() throws DeviceNotSupportedException {
/* Get an EGL instance. */
final EGL10 egl = (EGL10) EGLContext.getEGL();
/* Get to the default display. */
final EGLDisplay eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
/* We can now initialize EGL for that display. */
final int[] version = new int[2];
egl.eglInitialize(eglDisplay, version);
// TODO Doesn't correlate to possible multisampling request in EngineOptions...
final ConfigChooser configChooser = new ConfigChooser(false);
try {
configChooser.chooseConfig(egl, eglDisplay);
} catch (final IllegalArgumentException e) {
throw new DeviceNotSupportedException(DeviceNotSupportedCause.EGLCONFIG_NOT_FOUND, e);
}
}
Aggregations