summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/Mesh.java
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-12-08 16:14:36 -0800
committerJason Sams <rjsams@android.com>2010-12-08 16:14:36 -0800
commit5476b450e50939940dcf3f15c92335cee2fc572d (patch)
tree2129f5a5abfdfa6d43ae3e884d759d4614604c41 /graphics/java/android/renderscript/Mesh.java
parentaf8962e48ecf0ff3833084f540ca7e2f05295560 (diff)
Allocation API update.
Change-Id: I9b4a71f9e94c7d3978f06b7971051ab4f8472503
Diffstat (limited to 'graphics/java/android/renderscript/Mesh.java')
-rw-r--r--graphics/java/android/renderscript/Mesh.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java
index 9176bc895e49..44faa32d239b 100644
--- a/graphics/java/android/renderscript/Mesh.java
+++ b/graphics/java/android/renderscript/Mesh.java
@@ -77,14 +77,18 @@ public class Mesh extends BaseObj {
for(int i = 0; i < vtxCount; i ++) {
if(vtxIDs[i] != 0) {
- mVertexBuffers[i] = new Allocation(vtxIDs[i], mRS);
+ mVertexBuffers[i] = new Allocation(vtxIDs[i], mRS, null,
+ Allocation.USAGE_GRAPHICS_VERTEX |
+ Allocation.USAGE_SCRIPT);
mVertexBuffers[i].updateFromNative();
}
}
for(int i = 0; i < idxCount; i ++) {
if(idxIDs[i] != 0) {
- mIndexBuffers[i] = new Allocation(idxIDs[i], mRS);
+ mIndexBuffers[i] = new Allocation(idxIDs[i], mRS, null,
+ Allocation.USAGE_GRAPHICS_VERTEX |
+ Allocation.USAGE_SCRIPT);
mIndexBuffers[i].updateFromNative();
}
mPrimitives[i] = Primitive.values()[primitives[i]];