diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml index 887fd32ff..ec60e1567 100644 --- a/samples/ApiDemos/AndroidManifest.xml +++ b/samples/ApiDemos/AndroidManifest.xml @@ -4,9 +4,9 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -191,11 +191,11 @@ - + - + @@ -275,7 +275,7 @@ - + @@ -402,11 +402,11 @@ - + - + @@ -421,24 +421,24 @@ - + - + - + - + - + @@ -446,12 +446,12 @@ - + - + @@ -1427,7 +1427,7 @@ - + - + - - + + - + - + @@ -1487,7 +1487,7 @@ - + - + - + - + - + @@ -1761,7 +1761,7 @@ - + @@ -1855,7 +1855,7 @@ - + diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java b/samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java index 03b336e83..5e3e0fd91 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java @@ -208,8 +208,10 @@ public class CubeMapActivity extends Activity { String extensions = " " + gl.glGetString(GL10.GL_EXTENSIONS) + " "; // The extensions string is padded with spaces between extensions, but not // necessarily at the beginning or end. For simplicity, add spaces at the - // beginning and end of the extensions string to make it easy to find an - // extension. + // beginning and end of the extensions string and the extension string. + // This means we can avoid special-case checks for the first or last + // extension, as well as avoid special-case checks when an extension name + // is the same as the first part of another extension name. return extensions.indexOf(" " + extension + " ") >= 0; } } diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java b/samples/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java index 0c7bf64ce..e3d4a2839 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java @@ -48,13 +48,20 @@ public class FrameBufferObjectActivity extends Activity { private Triangle mTriangle; private Cube mCube; private float mAngle; - private boolean mDebugOffscreenRenderer = false; + /** + * Setting this to true will change the behavior of this sample. It + * will suppress the normally onscreen rendering, and it will cause the + * rendering that would normally be done to the offscreen FBO + * be rendered onscreen instead. This can be helpful in debugging the + * rendering algorithm. + */ + private static final boolean DEBUG_RENDER_OFFSCREEN_ONSCREEN = false; public void onDrawFrame(GL10 gl) { checkGLError(gl); if (mContextSupportsFrameBufferObject) { GL11ExtensionPack gl11ep = (GL11ExtensionPack) gl; - if (mDebugOffscreenRenderer) { + if (DEBUG_RENDER_OFFSCREEN_ONSCREEN) { drawOffscreenImage(gl, mSurfaceWidth, mSurfaceHeight); } else { gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, mFramebuffer); @@ -231,8 +238,10 @@ public class FrameBufferObjectActivity extends Activity { String extensions = " " + gl.glGetString(GL10.GL_EXTENSIONS) + " "; // The extensions string is padded with spaces between extensions, but not // necessarily at the beginning or end. For simplicity, add spaces at the - // beginning and end of the extensions string to make it easy to find an - // extension. + // beginning and end of the extensions string and the extension string. + // This means we can avoid special-case checks for the first or last + // extension, as well as avoid special-case checks when an extension name + // is the same as the first part of another extension name. return extensions.indexOf(" " + extension + " ") >= 0; } }