diff options
Diffstat (limited to 'graphics/java/android/renderscript/Program.java')
-rw-r--r-- | graphics/java/android/renderscript/Program.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java index 1614ec5..1628a97 100644 --- a/graphics/java/android/renderscript/Program.java +++ b/graphics/java/android/renderscript/Program.java @@ -38,8 +38,7 @@ public class Program extends BaseObj { String mShader; Program(int id, RenderScript rs) { - super(rs); - mID = id; + super(id, rs); } public void bindConstants(Allocation a, int slot) { @@ -91,8 +90,9 @@ public class Program extends BaseObj { mTextureCount = 0; } - public void setShader(String s) { + public BaseProgramBuilder setShader(String s) { mShader = s; + return this; } public void addInput(Element e) throws IllegalStateException { @@ -120,12 +120,13 @@ public class Program extends BaseObj { return mConstantCount++; } - public void setTextureCount(int count) throws IllegalArgumentException { + public BaseProgramBuilder setTextureCount(int count) throws IllegalArgumentException { // Should check for consistant and non-conflicting names... if(count >= MAX_CONSTANT) { throw new IllegalArgumentException("Max texture count exceeded."); } mTextureCount = count; + return this; } protected void initProgram(Program p) { |