Skip to content Skip to sidebar Skip to footer

Documentation For Androids Renderscript Advanced Rsforeach Call

I've a question about how Androids Renderscript rsForEach function with the rs_script_call_t* argument works. In the examples only the other (simple) rsForEach function is used, so

Solution 1:

The x/y/z/start/end values are indices to the memory allocation that the compute script is working on. The struct can limit a rsForEach call to a subregion of an allocation.

For example, for an allocation that is 640x480, you could define xStart = 100; xEnd = 200; yStart = 100; yEnd = 200. Then the foreach call would launch on a 100x100 region of the allocation.

The arrayStart and arrayEnd right now are not used currently, but are defined for a future release that will support array dimensions in allocations.

Default values are undefined, you need to define your own values in the struct. If you do not use the struct, the rsForEach call will work on the entire memory allocation.

There is a known bug that causes crashes when using this in Honeycomb, so this might be your issue. It has been fixed in ICS.

Post a Comment for "Documentation For Androids Renderscript Advanced Rsforeach Call"