summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/SimpleMesh.java
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-10-16 14:55:41 -0700
committerJason Sams <rjsams@android.com>2009-10-16 14:55:41 -0700
commit7299c83bd8f7053dec84d62a4914392bd91661ac (patch)
tree92d3bd324b58de3e6e6b690bd6ff01e19db88e5b /graphics/java/android/renderscript/SimpleMesh.java
parent0b08abe1b8e4f49cfaefb8226696664ad3d5ca6a (diff)
Fix bug exposed by filmstrip. The updated and expanded SimpleMesh had an ordering bug with component coordinates when both texture and normals were used.
Diffstat (limited to 'graphics/java/android/renderscript/SimpleMesh.java')
-rw-r--r--graphics/java/android/renderscript/SimpleMesh.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/graphics/java/android/renderscript/SimpleMesh.java b/graphics/java/android/renderscript/SimpleMesh.java
index 0ad093e57978..3d10e3bf0721 100644
--- a/graphics/java/android/renderscript/SimpleMesh.java
+++ b/graphics/java/android/renderscript/SimpleMesh.java
@@ -228,17 +228,17 @@ public class SimpleMesh extends BaseObj {
mVtxData[mVtxCount++] = mB;
mVtxData[mVtxCount++] = mA;
}
+ if ((mFlags & TEXTURE_0) != 0) {
+ makeSpace(2);
+ mVtxData[mVtxCount++] = mS0;
+ mVtxData[mVtxCount++] = mT0;
+ }
if ((mFlags & NORMAL) != 0) {
makeSpace(3);
mVtxData[mVtxCount++] = mNX;
mVtxData[mVtxCount++] = mNY;
mVtxData[mVtxCount++] = mNZ;
}
- if ((mFlags & TEXTURE_0) != 0) {
- makeSpace(2);
- mVtxData[mVtxCount++] = mS0;
- mVtxData[mVtxCount++] = mT0;
- }
}
public void addVertex(float x, float y) {