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.
This commit is contained in:
Jack Palevich
2009-08-21 11:48:50 -07:00
parent eec015ad14
commit 83d8d83ad1
3 changed files with 0 additions and 43 deletions

View File

@@ -64,29 +64,6 @@ class CubeRenderer implements GLSurfaceView.Renderer {
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);

View File

@@ -134,16 +134,6 @@ class TouchSurfaceView extends GLSurfaceView {
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);

View File

@@ -50,16 +50,6 @@ public class SpriteTextRenderer implements GLSurfaceView.Renderer{
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