Adding getters to rs program obejcts.

Change-Id: Iff8ccc1835109d303201d6a1adb6e5cbde8ba634
This commit is contained in:
Alex Sakhartchouk
2012-01-06 10:36:06 -08:00
parent 95853e4e2b
commit d5a62bb802
2 changed files with 51 additions and 0 deletions

View File

@ -76,6 +76,40 @@ public class Program extends BaseObj {
super(id, rs);
}
/**
* @hide
*/
public int getConstantCount() {
return mConstants != null ? mConstants.length : 0;
}
/**
* @hide
*/
public Type getConstant(int slot) {
if (slot < 0 || slot >= mConstants.length) {
throw new IllegalArgumentException("Slot ID out of range.");
}
return mConstants[slot];
}
/**
* @hide
*/
public int getTextureCount() {
return mTextureCount;
}
/**
* @hide
*/
public TextureType getTextureType(int slot) {
if ((slot < 0) || (slot >= mTextureCount)) {
throw new IllegalArgumentException("Slot ID out of range.");
}
return mTextures[slot];
}
/**
* Binds a constant buffer to be used as uniform inputs to the
* program