When i use the function AllocationAdapter.create2D(RenderScriptGL mRS,
Allocation allocation) to create an AllocationAdapter, the parameter
allocation cannot be passed into the function, why?
the code as follows:
private Allocation Generate(int width, int height, int[] data) {
final Type.Builder builder = new Type.Builder(mRS, A_8(mRS));
builder.setX(width);
builder.setY(height);
Allocation allocation = Allocation.createTyped(mRS,
builder.create());
AllocationAdapter a = AllocationAdapter.create2D(mRS, allocation);
a.setLOD(0);
a.copy2DRangeFrom(0, 0, 4, 1, data);
a.setLOD(1);
a.copy2DRangeFrom(0, 0, 2, 1, grey1);
a.setLOD(2);
a.copy2DRangeFrom(0, 0, 1, 1, grey2);
return allocation;
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en