As I mentioned in my previous post (Compiling renderscript code at runtime), I try to compile renderscript code at runtime. As suggested by Kietz I need to alter the ScriptC class from which all generated java classes derive. Making my own class that extends Script fails because I cannot invoke the constructor of this super class.
This snippet of the code
public class RuntimeScriptC extends Script {
private static final String TAG = "RuntimeScriptC";
protected RuntimeScriptC(int id, RenderScript rs) {
super(id, rs);
}
gives me this error:
The constructor Script(int, RenderScript) is undefined
My next idea was to add my own class to the renderscript source code and compile it to create a new .jar. I found the source code on git but have no idea how to only build the renderscript package.
Edit:
I just found out that the constructor of Script.java
is package private. That's why I can't access the constructor in my own class. If I can compile the renderscript sources myself I could place my own class into the package and access it.
New question: Where can I find the renderscript sources and how can I compile them?