diff options
author | Jason Sams <rjsams@android.com> | 2010-06-01 15:47:01 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-06-01 15:47:01 -0700 |
commit | 8cb39de03aef6097a90033600d11a60ae000a6e4 (patch) | |
tree | cc9eb5fa87de5e14713684e7e177368d10550384 /graphics/java/android/renderscript/SimpleMesh.java | |
parent | c9d0a87d504b3f0322b43f971f9cb4838ee521fb (diff) |
Remove RS_KIND from vertex arrays types.
Legacy vertex programs now bind by name just like the user programs.
This removes the need for two different ways of declairing the same
information.
Change-Id: I0178c0962842a1bbffb6726984ae1b8f5bb7529c
Diffstat (limited to 'graphics/java/android/renderscript/SimpleMesh.java')
-rw-r--r-- | graphics/java/android/renderscript/SimpleMesh.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/graphics/java/android/renderscript/SimpleMesh.java b/graphics/java/android/renderscript/SimpleMesh.java index 4a217a9e4d68..fc011b5cdf79 100644 --- a/graphics/java/android/renderscript/SimpleMesh.java +++ b/graphics/java/android/renderscript/SimpleMesh.java @@ -313,30 +313,20 @@ public class SimpleMesh extends BaseObj { public SimpleMesh create() { Element.Builder b = new Element.Builder(mRS); int floatCount = mVtxSize; - b.add(Element.createAttrib(mRS, + b.add(Element.createVector(mRS, Element.DataType.FLOAT_32, - Element.DataKind.POSITION, mVtxSize), "position"); if ((mFlags & COLOR) != 0) { floatCount += 4; - b.add(Element.createAttrib(mRS, - Element.DataType.FLOAT_32, - Element.DataKind.COLOR, - 4), "color"); + b.add(Element.F32_4(mRS), "color"); } if ((mFlags & TEXTURE_0) != 0) { floatCount += 2; - b.add(Element.createAttrib(mRS, - Element.DataType.FLOAT_32, - Element.DataKind.TEXTURE, - 2), "texture"); + b.add(Element.F32_2(mRS), "texture0"); } if ((mFlags & NORMAL) != 0) { floatCount += 3; - b.add(Element.createAttrib(mRS, - Element.DataType.FLOAT_32, - Element.DataKind.NORMAL, - 3), "normal"); + b.add(Element.F32_3(mRS), "normal"); } mElement = b.create(); |