Sid Datta
Sid Datta

Reputation: 1109

Is there any way to check in RenderScrpt if an rs_allocation has been bound properly?

Whenever I define

rs_allocation abcd;

in my renderscript, I am afraid I will forget to bind it from Java, leading to cryptic issues. Is there any way to write

if (abcd == NULL)
    rsDebug("Error");

or

if (!rsIsValidAllocation(abcd))
    rsDebug("Error");

etc ?

Upvotes: 1

Views: 188

Answers (1)

R. Jason Sams
R. Jason Sams

Reputation: 1469

You want something like this...

if(!rsIsObject(abcd))

Upvotes: 2

Related Questions