Remove unused getConfigSpec methods from ApiDemos sample code
At one time during the development of GLSurfaceView, the
GLSurfaceView.Renderer interface had a getConfigSpec method that was used to
select the frame buffer format. This method was removed from the
Renderer interface before GLSurfaceView became a public API, but
the sample code still defined these now-unused methods.
To reduce the chance of confusing a developer who uses the sample code,
this change removes the dead, no-longer-called getConfigSpec
implementations from the three samples.
See GLSurfaceView.setEGLConfigChooser for the replacement
technique.
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java
index 527e2bc..0f15f91 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java
@@ -64,29 +64,6 @@
mAngle += 1.2f;
}
- public int[] getConfigSpec() {
- if (mTranslucentBackground) {
- // We want a depth buffer and an alpha buffer
- int[] configSpec = {
- EGL10.EGL_RED_SIZE, 8,
- EGL10.EGL_GREEN_SIZE, 8,
- EGL10.EGL_BLUE_SIZE, 8,
- EGL10.EGL_ALPHA_SIZE, 8,
- EGL10.EGL_DEPTH_SIZE, 16,
- EGL10.EGL_NONE
- };
- return configSpec;
- } else {
- // 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 onSurfaceChanged(GL10 gl, int width, int height) {
gl.glViewport(0, 0, width, height);
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java b/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java
index 09d3694..c0f32a7 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java
@@ -134,16 +134,6 @@
mCube.draw(gl);
}
- 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 onSurfaceChanged(GL10 gl, int width, int height) {
gl.glViewport(0, 0, width, height);
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java
index b9369cd..223300a 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java
@@ -50,16 +50,6 @@
mLabelPaint.setARGB(0xff, 0x00, 0x00, 0x00);
}
- 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