aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2013-07-25 17:26:59 -0700
committerSiva Velusamy <vsiva@google.com>2013-07-25 17:28:45 -0700
commitd3c3a11c07678b06dfa12f6f5d9c3df8da7cc1a4 (patch)
treef9c7cf89aaf895e1e3243e81d88465377dc3c15d /eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com
parent5a0e0eddb2fb3857ce6bcdbca30c9c0c4e5c12fa (diff)
downloadsdk-d3c3a11c07678b06dfa12f6f5d9c3df8da7cc1a4.zip
sdk-d3c3a11c07678b06dfa12f6f5d9c3df8da7cc1a4.tar.gz
sdk-d3c3a11c07678b06dfa12f6f5d9c3df8da7cc1a4.tar.bz2
Add clarifying comment.
If data is of float type, then we assume that it is meant for the alpha channel even if it is marked as R/G or B channels. Change-Id: I8a95c3533def4a5bdb2b49e9489674bffb2a0cef
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com')
-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: