OSDN Git Service

[fixed] EGL_BAD_ALLOC according to the findings by Makush on the forums. Can't reprod...
authorbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Mon, 9 Jan 2012 16:45:27 +0000 (16:45 +0000)
committerbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Mon, 9 Jan 2012 16:45:27 +0000 (16:45 +0000)
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGraphics.java

index cb22e0c..8f79ccc 100644 (file)
@@ -107,46 +107,19 @@ public final class AndroidGraphics implements Graphics, Renderer {
                } 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