Search code examples
renderscriptandroid-renderscript

How to set values of a renderscript globalusing rsSetElementAt_type() function


In Android RenderScript:

A kernel may not have more than one input or one output Allocation. If more than one input or output is required, those objects should be bound to rs_allocation script globals and accessed from a kernel or invokable function via rsGetElementAt_type() or rsSetElementAt_type().

Now I knew that the function rsGetElementAt_type() takes three parameters :

rs_allocation input , uint32_t x and uint 32_t y 

but I do not know how to set values of a global rsSetElementAt_type()

Can Anyone please tell me what parameters this function take and in which order?

I have searched android documentation and google but could not find it


Solution

  • It depends on the type contained in the Allocation, but you can find details Renderscript Runtime API Reference page.