summaryrefslogtreecommitdiff
path: root/samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2010-02-03 16:00:49 +0800
committerJack Palevich <jackpal@google.com>2010-02-03 16:00:49 +0800
commit66914d4a73fed61ecf56b80c328b30b4fcdcbaef (patch)
treedf29a344d40242d93603686b63c788ffa3327fe7 /samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java
parentf8db21698ae9a90ec01e8015fb5d90bc24a3342f (diff)
Improve Cube Map and FrameBufferObject samples.
Fix tabs and trailing whitespace. Expand comment to explain how we search for GL extensions. Rename and document the DEBUG_RENDER_OFFSCREEN_ONSCREEN variable. Also make it final static because its value never changes.
Diffstat (limited to 'samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java')
-rw-r--r--samples/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java6
1 files changed, 4 insertions, 2 deletions
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;
}
}