aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2013-07-26 00:29:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-07-26 00:29:16 +0000
commita90745a21a51f6e5c6a1d66e01cd2397f6ee8a48 (patch)
treef9c7cf89aaf895e1e3243e81d88465377dc3c15d
parent5a0e0eddb2fb3857ce6bcdbca30c9c0c4e5c12fa (diff)
parentd3c3a11c07678b06dfa12f6f5d9c3df8da7cc1a4 (diff)
downloadsdk-a90745a21a51f6e5c6a1d66e01cd2397f6ee8a48.zip
sdk-a90745a21a51f6e5c6a1d66e01cd2397f6ee8a48.tar.gz
sdk-a90745a21a51f6e5c6a1d66e01cd2397f6ee8a48.tar.bz2
Merge "Add clarifying comment."
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/TexImageTransform.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/TexImageTransform.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/TexImageTransform.java
index a88f21c..dde89ea 100644
--- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/TexImageTransform.java
+++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/TexImageTransform.java
@@ -193,6 +193,15 @@ public class TexImageTransform implements IStateTransform {
case GL_RED:
case GL_GREEN:
case GL_BLUE:
+ // GL_RED, GL_GREEN and GL_BLUE are all supposed to fill those respective
+ // channels, but we assume that the programmers intent was to use GL_ALPHA in order
+ // to overcome the issue that GL_ALPHA cannot be used with float data.
+ if (mType != GLEnum.GL_FLOAT) {
+ throw new RuntimeException();
+ } else {
+ // fall through - assume that it is GL_ALPHA
+ }
+ //$FALL-THROUGH$
case GL_ALPHA:
return addRGBChannels(subImageData, width, height);
case GL_LUMINANCE: