Implement Object readback.

This commit is contained in:
Jason Sams
2009-09-15 12:39:22 -07:00
parent 988f6ebb44
commit 5f43fd289a
3 changed files with 72 additions and 4 deletions

View File

@ -113,6 +113,10 @@ public class Allocation extends BaseObj {
mRS.nAllocationSubDataFromObject(mID, mType, 0, o);
}
public void read(Object o) {
mRS.nAllocationSubReadFromObject(mID, mType, 0, o);
}
public void subData(int offset, Object o) {
mRS.nAllocationSubDataFromObject(mID, mType, offset, o);
}

View File

@ -106,6 +106,7 @@ public class RenderScript {
native void nAllocationRead(int id, int[] d);
native void nAllocationRead(int id, float[] d);
native void nAllocationSubDataFromObject(int id, Type t, int offset, Object o);
native void nAllocationSubReadFromObject(int id, Type t, int offset, Object o);
native void nTriangleMeshBegin(int vertex, int index);
native void nTriangleMeshAddVertex_XY (float x, float y);