} else {\r
config.useGL20 = false;\r
configChooser = getEglConfigChooser();\r
- if (Integer.parseInt(android.os.Build.VERSION.SDK) <= 4) {\r
- GLSurfaceViewCupcake view = new GLSurfaceViewCupcake(activity, resolutionStrategy);\r
- if (configChooser != null)\r
- view.setEGLConfigChooser(configChooser);\r
- else\r
- view.setEGLConfigChooser(config.r, config.g, config.b, config.a, config.depth, config.stencil);\r
- view.setRenderer(this);\r
- return view;\r
- } else {\r
- android.opengl.GLSurfaceView view = new DefaultGLSurfaceView(activity, resolutionStrategy);\r
- if (configChooser != null)\r
- view.setEGLConfigChooser(configChooser);\r
- else\r
- view.setEGLConfigChooser(config.r, config.g, config.b, config.a, config.depth, config.stencil);\r
- view.setRenderer(this);\r
- return view;\r
- }\r
+ GLSurfaceViewCupcake view = new GLSurfaceViewCupcake(activity, resolutionStrategy);\r
+ if (configChooser != null)\r
+ view.setEGLConfigChooser(configChooser);\r
+ else\r
+ view.setEGLConfigChooser(config.r, config.g, config.b, config.a, config.depth, config.stencil);\r
+ view.setRenderer(this);\r
+ return view;\r
}\r
}\r
\r
private EGLConfigChooser getEglConfigChooser () {\r
return new GdxEglConfigChooser(config.r, config.g, config.b, config.a, config.depth, config.stencil, config.numSamples,\r
config.useGL20);\r
-\r
-// if (!Build.DEVICE.equalsIgnoreCase("GT-I7500"))\r
-// return null;\r
-// else\r
-// return new android.opengl.GLSurfaceView.EGLConfigChooser() {\r
-//\r
-// public EGLConfig chooseConfig (EGL10 egl, EGLDisplay display) {\r
-//\r
-// // Ensure that we get a 16bit depth-buffer. Otherwise, we'll fall\r
-// // back to Pixelflinger on some device (read: Samsung I7500)\r
-// int[] attributes = new int[] {EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE};\r
-// EGLConfig[] configs = new EGLConfig[1];\r
-// int[] result = new int[1];\r
-// egl.eglChooseConfig(display, attributes, configs, 1, result);\r
-// return configs[0];\r
-// }\r
-// };\r
}\r
\r
private void updatePpi () {\r