Automated import from //branches/cupcake/...@142485,142485
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java b/samples/ApiDemos/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java
index 750a47b..a0bad4b 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java
@@ -34,6 +34,10 @@
// Create our Preview view and set it as the content of our
// Activity
mGLSurfaceView = new GLSurfaceView(this);
+ // We want an 8888 pixel format because that's required for
+ // a translucent window.
+ // And we want a depth buffer.
+ mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
// Tell the cube renderer that we want to render a translucent version
// of the cube:
mGLSurfaceView.setRenderer(new CubeRenderer(true));
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleActivity.java b/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleActivity.java
index 59f3c6c..e5b06f4 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleActivity.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleActivity.java
@@ -26,6 +26,7 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mGLView = new GLSurfaceView(this);
+ mGLView.setEGLConfigChooser(false);
mGLView.setRenderer(new TriangleRenderer(this));
setContentView(mGLView);
}
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
index 451b927..e5299b3 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
@@ -44,16 +44,6 @@
mTriangle = new Triangle();
}
- public int[] getConfigSpec() {
- // We don't need a depth buffer, and don't care about our
- // color depth.
- int[] configSpec = {
- EGL10.EGL_DEPTH_SIZE, 0,
- EGL10.EGL_NONE
- };
- return configSpec;
- }
-
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
/*
* By default, OpenGL enables features that improve quality
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java
index 252f566..9977041 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java
@@ -74,15 +74,6 @@
mWorld.draw(gl);
}
- public int[] getConfigSpec() {
- // Need a depth buffer, don't care about color depth.
- int[] configSpec = {
- EGL10.EGL_DEPTH_SIZE, 16,
- EGL10.EGL_NONE
- };
- return configSpec;
- }
-
public void onSurfaceChanged(GL10 gl, int width, int height) {
gl.glViewport(0, 0, width, height);
diff --git a/samples/Compass/src/com/example/android/compass/CompassActivity.java b/samples/Compass/src/com/example/android/compass/CompassActivity.java
index c4b9566..74f3bc7 100644
--- a/samples/Compass/src/com/example/android/compass/CompassActivity.java
+++ b/samples/Compass/src/com/example/android/compass/CompassActivity.java
@@ -89,16 +89,6 @@
mSensorManager.unregisterListener(this);
}
- public int[] getConfigSpec() {
- // We want a depth buffer, don't care about the
- // details of the color buffer.
- int[] configSpec = {
- EGL10.EGL_DEPTH_SIZE, 16,
- EGL10.EGL_NONE
- };
- return configSpec;
- }
-
public void onDrawFrame(GL10 gl) {
/*
* Usually, the first thing one might want to do is to clear