From 7299c83bd8f7053dec84d62a4914392bd91661ac Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Fri, 16 Oct 2009 14:55:41 -0700 Subject: Fix bug exposed by filmstrip. The updated and expanded SimpleMesh had an ordering bug with component coordinates when both texture and normals were used. --- graphics/java/android/renderscript/SimpleMesh.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'graphics/java') diff --git a/graphics/java/android/renderscript/SimpleMesh.java b/graphics/java/android/renderscript/SimpleMesh.java index 0ad093e..3d10e3b 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) { -- cgit v1.1