How to get/set boolean elements in RenderScript Allocations?

68 Views Asked by At

I create an allocation of element type boolean in Java/Kotlin like this:

script._booleanAllocation =  Allocation.createTyped(rs, Type.createX(rs, Element.BOOLEAN(rs), 10))

I pass this allocation to the script and I want to access the cell using one of the rsGetElementAt* or rsSetElementAt* methods - but there is no boolean equivalent like rsGetElementAt_boolean or rsSetElementAt_boolean. How do I access the cells?

0

There are 0 best solutions below