diff options
Diffstat (limited to 'graphics/java/android')
-rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 4 | ||||
-rw-r--r-- | graphics/java/android/renderscript/Program.java | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index 115dd62..7d100eb 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -39,6 +39,10 @@ public class Allocation extends BaseObj { mType = t; } + public Type getType() { + return mType; + } + public void uploadToTexture(int baseMipLevel) { mRS.validate(); mRS.validateSurface(); diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java index 9d70cb2..1614ec5 100644 --- a/graphics/java/android/renderscript/Program.java +++ b/graphics/java/android/renderscript/Program.java @@ -111,12 +111,13 @@ public class Program extends BaseObj { mOutputs[mOutputCount++] = e; } - public void addConstant(Type t) throws IllegalStateException { + public int addConstant(Type t) throws IllegalStateException { // Should check for consistant and non-conflicting names... if(mConstantCount >= MAX_CONSTANT) { throw new IllegalArgumentException("Max input count exceeded."); } - mConstants[mConstantCount++] = t; + mConstants[mConstantCount] = t; + return mConstantCount++; } public void setTextureCount(int count) throws IllegalArgumentException { |